Mercurial > emacs
changeset 107088:ef8266a66d37
Fix for Bug#5526.
* charset.c (load_charset_map_from_file): Allocate large
charset_map_entries structure on the heap rather than the stack.
(Bug#5526).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Thu, 04 Feb 2010 22:54:49 -0500 |
parents | 392cb4c24760 |
children | d9f5c24a36cb |
files | src/ChangeLog src/charset.c |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Thu Feb 04 20:53:40 2010 -0500 +++ b/src/ChangeLog Thu Feb 04 22:54:49 2010 -0500 @@ -1,3 +1,9 @@ +2010-02-05 Chong Yidong <cyd@stupidchicken.com> + + * charset.c (load_charset_map_from_file): Allocate large + charset_map_entries structure on the heap rather than the stack. + (Bug#5526). + 2010-01-31 Kenichi Handa <handa@m17n.org> * font.c (font_parse_xlfd): If FONT is a font-entity and pixel
--- a/src/charset.c Thu Feb 04 20:53:40 2010 -0500 +++ b/src/charset.c Thu Feb 04 22:54:49 2010 -0500 @@ -526,7 +526,7 @@ error ("Failure in loading charset map: %S", SDATA (mapfile)); head = entries = ((struct charset_map_entries *) - alloca (sizeof (struct charset_map_entries))); + xmalloc (sizeof (struct charset_map_entries))); n_entries = 0; eof = 0; while (1) @@ -563,6 +563,7 @@ close (fd); load_charset_map (charset, head, n_entries, control_flag); + xfree (head); } static void