From 5604ec34e4b9414637d0501f30c79a4b871008a0 Mon Sep 17 00:00:00 2001 From: Andrew Choi Date: Sun, 28 Jan 2001 15:41:57 +0000 Subject: [PATCH] * fontset.c (fontset_pattern_regexp): Allocate three more bytes to regex for '^', '$', and '\0'. --- src/ChangeLog | 3 +++ src/fontset.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index e5987f7fcc3..614c80f8db3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2001-01-28 Andrew Choi + * fontset.c (fontset_pattern_regexp): Allocate three more bytes to + regex for '^', '$', and '\0'. + * alloc.c (allocate_string) [macintosh]: Call check_string_bytes only if current_sblock has been initialized. diff --git a/src/fontset.c b/src/fontset.c index 20e212f0e34..51980e69b78 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -719,7 +719,7 @@ fontset_pattern_regexp (pattern) || strcmp (XSTRING (pattern)->data, CACHED_FONTSET_NAME)) { /* We must at first update the cached data. */ - char *regex = (char *) alloca (XSTRING (pattern)->size * 2); + char *regex = (char *) alloca (XSTRING (pattern)->size * 2 + 3); char *p0, *p1 = regex; /* Convert "*" to ".*", "?" to ".". */ -- 2.39.2