diff options
| author | Jan D | 2015-03-22 10:21:45 +0100 |
|---|---|---|
| committer | Jan D | 2015-03-22 10:21:45 +0100 |
| commit | ae3d7333608652cc35f1d50cac9ea90b55f12a08 (patch) | |
| tree | f3c14dfb1ec096f60c7ad99deb67771779cb2084 /src | |
| parent | e72edc05c3277fbf57a94daaa792635bfede7bc0 (diff) | |
| download | emacs-ae3d7333608652cc35f1d50cac9ea90b55f12a08.tar.gz emacs-ae3d7333608652cc35f1d50cac9ea90b55f12a08.zip | |
Backport 20156 fix (stack corruption)
Fixes: debbugs:20156
* src/fontset.c (fontset_pattern_regexp): Backport: Replace + 1 with
+ 3 in alloca (tiny change)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/fontset.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 90908fcf759..060486b4ab3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2015-03-22 John F Carr <jfc@mit.edu> | ||
| 2 | |||
| 3 | * fontset.c (fontset_pattern_regexp): Backport: Replace + 1 with | ||
| 4 | + 3 in alloca (Bug#20156) (tiny change) | ||
| 5 | |||
| 1 | 2015-03-12 Glenn Morris <rgm@gnu.org> | 6 | 2015-03-12 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * frame.h (x_set_bitmap_icon): Don't set the icon if icon-type is | 8 | * 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 d9aa99d05f5..5772cc830c8 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -1097,9 +1097,9 @@ fontset_pattern_regexp (Lisp_Object pattern) | |||
| 1097 | we convert "*" to "[^-]*" which is much faster in regular | 1097 | we convert "*" to "[^-]*" which is much faster in regular |
| 1098 | expression matching. */ | 1098 | expression matching. */ |
| 1099 | if (ndashes < 14) | 1099 | if (ndashes < 14) |
| 1100 | p1 = regex = alloca (SBYTES (pattern) + 2 * nstars + 2 * nescs + 1); | 1100 | p1 = regex = alloca (SBYTES (pattern) + 2 * nstars + 2 * nescs + 3); |
| 1101 | else | 1101 | else |
| 1102 | p1 = regex = alloca (SBYTES (pattern) + 5 * nstars + 2 * nescs + 1); | 1102 | p1 = regex = alloca (SBYTES (pattern) + 5 * nstars + 2 * nescs + 3); |
| 1103 | 1103 | ||
| 1104 | *p1++ = '^'; | 1104 | *p1++ = '^'; |
| 1105 | for (p0 = SDATA (pattern); *p0; p0++) | 1105 | for (p0 = SDATA (pattern); *p0; p0++) |