GNU bug report logs -
#24206
25.1; Curly quotes generate invalid strings, leading to a segfault
Previous Next
Reported by: Phil <p.stephani2 <at> gmail.com>
Date: Thu, 11 Aug 2016 18:57:02 UTC
Severity: normal
Found in version 25.1
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 08/14/2016 09:27 AM, Eli Zaretskii wrote:
> The "length = 1" part is only correct if the argument string is
> multibyte, and should otherwise count the number of bytes in
> uLSQM/uRSQ, right?
This string is by definition multibyte at that point, since that part of
the code is inserting a Unicode character that is not ASCII.
More generally, Fsubstitute_command_keys is quite confused about unibyte
versus multibyte issues. It merges together a number of strings, and
assumes that they are all multibyte iff the original string is
multibyte, which is obviously not true in general. (This problem is not
limited to the requoting part of the code.) In master, I've altered the
implementation to always generate either the original string, or an
ASCII string, or a multibyte string. Since substitute-command-keys is
not intended to be used on encoded unibyte text, that's good enough.
This bug report was last modified 8 years and 339 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.