From b1feb9b4ec2622788f3a68d041fb2a086e452f1a Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 26 Jun 2010 20:47:35 +0200 Subject: [PATCH] * alloc.c (Fmake_byte_code): Don't access undefined argument (Bug#6517). --- src/ChangeLog | 5 +++++ src/alloc.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 -- 2.39.2