summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog5
-rw-r--r--src/fontset.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5aa248e91b9..79feb611f3d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-22 Jan Djärv <jan.h.d@swipnet.se>
+
+ * fontset.c (fontset_pattern_regexp): Replace + 1 with + 3 for
+ regexsize (Bug#20156).
+
2015-03-21 Eli Zaretskii <eliz@gnu.org>
* emacs.c (synchronize_locale) [WINDOWSNT]: Ignore 'category' and
diff --git a/src/fontset.c b/src/fontset.c
index c0303fa5a34..763d84628b5 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -1074,7 +1074,7 @@ fontset_pattern_regexp (Lisp_Object pattern)
expression matching. */
ptrdiff_t regexsize = (SBYTES (pattern)
+ (ndashes < 14 ? 2 : 5) * nstars
- + 2 * nescs + 1);
+ + 2 * nescs + 3);
USE_SAFE_ALLOCA;
p1 = regex = SAFE_ALLOCA (regexsize);