From a9da537b35f221689a2084711009584d2f664883 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 8 May 2017 13:20:53 -0700 Subject: [PATCH] Fix inadvertent removal of primitive body. Thanks to Matt Birkholz. --- src/microcode/prbfish.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/microcode/prbfish.c b/src/microcode/prbfish.c index 3157ea3e7..c0d61c7f6 100644 --- a/src/microcode/prbfish.c +++ b/src/microcode/prbfish.c @@ -86,6 +86,19 @@ KEY is a Blowfish key.\n\ ENCRYPT? says whether to encrypt (#T) or decrypt (#F).") { PRIMITIVE_HEADER (4); + CHECK_ARG (1, STRING_P); + unsigned long input_length; + uint8_t * input = (arg_bytevector (1, (&input_length))); + if (input_length != 8) + error_bad_range_arg (1); + unsigned long output_length; + uint8_t * output = (arg_bytevector (2, (&output_length))); + if (output_length != 8) + error_bad_range_arg (2); + BF_ecb_encrypt (input, + output, + (key_arg (3)), + ((BOOLEAN_ARG (4)) ? BF_ENCRYPT : BF_DECRYPT)); PRIMITIVE_RETURN (UNSPECIFIC); } -- 2.25.1