]> git.eshelyaron.com Git - emacs.git/commitdiff
* fontset.c (fontset_pattern_regexp): Allocate three more bytes to
authorAndrew Choi <akochoi@shaw.ca>
Sun, 28 Jan 2001 15:41:57 +0000 (15:41 +0000)
committerAndrew Choi <akochoi@shaw.ca>
Sun, 28 Jan 2001 15:41:57 +0000 (15:41 +0000)
regex for '^', '$', and '\0'.

src/ChangeLog
src/fontset.c

index e5987f7fcc38c42e916db6735dbc3bbfba2b3fb9..614c80f8db3564dbbc4091d185acddf915ac55bb 100644 (file)
@@ -1,5 +1,8 @@
 2001-01-28  Andrew Choi  <akochoi@i-cable.com>
 
+       * 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.
 
index 20e212f0e34c010a70e0db060e9fff5319a1e812..51980e69b78a46e3998b5528b37a8c29b81de5c2 100644 (file)
@@ -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 ".".  */