bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24206: 25.1; Curly quotes generate invalid strings, leading to a seg


From: Eli Zaretskii
Subject: bug#24206: 25.1; Curly quotes generate invalid strings, leading to a segfault
Date: Sun, 14 Aug 2016 20:21:43 +0300

> Cc: address@hidden, Eli Zaretskii <address@hidden>,
>  John Wiegley <address@hidden>, Nicolas Petton <address@hidden>
> From: Paul Eggert <address@hidden>
> Date: Sat, 13 Aug 2016 23:54:43 -0500
> 
> For Emacs 25 I propose installing the attached patch, which should avoid 
> the emacs-goodies-el problem though it does not fix the other 
> (presumably less-likely) bugs in this area. This patch is considerably 
> simpler than what I just installed into master.

Paul, would you agree with the following alternative patch for the
release branch?

Phil, is the recipe you presented in this bug _exactly_ what
emacs-goodies-el does?  If not, could you please see if the proposed
patch below fixes the real-life use case as well, and if not, show
that use case?  TIA.

diff --git a/src/doc.c b/src/doc.c
index 7cdb0d0..bba30b4 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -965,7 +965,8 @@ Otherwise, return a new string.  */)
          }
        }
       else if ((strp[0] == '`' || strp[0] == '\'')
-              && quoting_style == CURVE_QUOTING_STYLE)
+              && quoting_style == CURVE_QUOTING_STYLE
+              && multibyte)
        {
          start = (unsigned char const *) (strp[0] == '`' ? uLSQM : uRSQM);
          length = 1;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]