emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 ae3d733: Backport 20156 fix (stack corruption)


From: Jan D.
Subject: [Emacs-diffs] emacs-24 ae3d733: Backport 20156 fix (stack corruption)
Date: Sun, 22 Mar 2015 09:21:57 +0000

branch: emacs-24
commit ae3d7333608652cc35f1d50cac9ea90b55f12a08
Author: Jan D <address@hidden>
Commit: Jan D <address@hidden>

    Backport 20156 fix (stack corruption)
    
    Fixes: debbugs:20156
    
    * src/fontset.c (fontset_pattern_regexp): Backport: Replace + 1 with
    + 3 in alloca (tiny change)
---
 src/ChangeLog |    5 +++++
 src/fontset.c |    4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 90908fc..060486b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-22  John F Carr <address@hidden>
+
+       * fontset.c (fontset_pattern_regexp): Backport: Replace + 1 with
+       + 3 in alloca (Bug#20156) (tiny change)
+
 2015-03-12  Glenn Morris  <address@hidden>
 
        * frame.h (x_set_bitmap_icon): Don't set the icon if icon-type is
diff --git a/src/fontset.c b/src/fontset.c
index d9aa99d..5772cc8 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -1097,9 +1097,9 @@ fontset_pattern_regexp (Lisp_Object pattern)
         we convert "*" to "[^-]*" which is much faster in regular
         expression matching.  */
       if (ndashes < 14)
-       p1 = regex = alloca (SBYTES (pattern) + 2 * nstars + 2 * nescs + 1);
+       p1 = regex = alloca (SBYTES (pattern) + 2 * nstars + 2 * nescs + 3);
       else
-       p1 = regex = alloca (SBYTES (pattern) + 5 * nstars + 2 * nescs + 1);
+       p1 = regex = alloca (SBYTES (pattern) + 5 * nstars + 2 * nescs + 3);
 
       *p1++ = '^';
       for (p0 = SDATA (pattern); *p0; p0++)



reply via email to

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