aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/charset.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 393223c0802..63ea7c29bf4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12011-01-31 Jim Meyering <meyering@redhat.com>
2
3 * charset.c (load_charset_map): Don't deref NULL on failed malloc.
4 Use xmalloc rather than malloc.
5
12011-01-30 Paul Eggert <eggert@cs.ucla.edu> 62011-01-30 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 strftime: import from gnulib 8 strftime: import from gnulib
diff --git a/src/charset.c b/src/charset.c
index 57e24ae0c31..a6046600194 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -292,7 +292,7 @@ load_charset_map (struct charset *charset, struct charset_map_entries *entries,
292 else 292 else
293 { 293 {
294 if (! temp_charset_work) 294 if (! temp_charset_work)
295 temp_charset_work = malloc (sizeof (*temp_charset_work)); 295 temp_charset_work = xmalloc (sizeof (*temp_charset_work));
296 if (control_flag == 1) 296 if (control_flag == 1)
297 { 297 {
298 memset (temp_charset_work->table.decoder, -1, 298 memset (temp_charset_work->table.decoder, -1,