From: Chris Hanson Date: Mon, 8 May 2017 20:20:53 +0000 (-0700) Subject: Fix inadvertent removal of primitive body. Thanks to Matt Birkholz. X-Git-Tag: mit-scheme-pucked-9.2.12~14^2~63 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a9da537b35f221689a2084711009584d2f664883;p=mit-scheme.git Fix inadvertent removal of primitive body. Thanks to Matt Birkholz. --- 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); }