From: Andreas Schwab Date: Sat, 26 Jun 2010 18:47:35 +0000 (+0200) Subject: * alloc.c (Fmake_byte_code): Don't access undefined argument (Bug#6517). X-Git-Tag: emacs-pretest-23.2.90~139^2~84 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b1feb9b4ec2622788f3a68d041fb2a086e452f1a;p=emacs.git * alloc.c (Fmake_byte_code): Don't access undefined argument (Bug#6517). --- diff --git a/src/ChangeLog b/src/ChangeLog index 4d80761d7d6..5ba3f0e12a2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-06-26 Andreas Schwab + + * alloc.c (Fmake_byte_code): Don't access undefined argument + (Bug#6517). + 2010-06-25 Chong Yidong * xdisp.c (next_element_from_image): Ensure that after-strings are diff --git a/src/alloc.c b/src/alloc.c index 9a935cc8952..da63fe0f82b 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -3094,7 +3094,7 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT else val = Fmake_vector (len, Qnil); - if (STRINGP (args[1]) && STRING_MULTIBYTE (args[1])) + if (nargs > 1 && STRINGP (args[1]) && STRING_MULTIBYTE (args[1])) /* BYTECODE-STRING must have been produced by Emacs 20.2 or the earlier because they produced a raw 8-bit string for byte-code and now such a byte-code string is loaded as multibyte while