Commit ae3d7333 authored by Jan D's avatar Jan D

Backport 20156 fix (stack corruption)

Fixes: debbugs:20156

* src/fontset.c (fontset_pattern_regexp): Backport: Replace + 1 with
+ 3 in alloca (tiny change)
parent e72edc05
2015-03-22 John F Carr <jfc@mit.edu>
* fontset.c (fontset_pattern_regexp): Backport: Replace + 1 with
+ 3 in alloca (Bug#20156) (tiny change)
2015-03-12 Glenn Morris <rgm@gnu.org>
* frame.h (x_set_bitmap_icon): Don't set the icon if icon-type is
......
......@@ -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++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment