Skip to content

Commit c1e5bb4

Browse files
committed
Fix a null pointer access in "iconv -l".
1 parent f85d527 commit c1e5bb4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2003-05-20 Bruno Haible <bruno@clisp.org>
2+
3+
* lib/iconv.c (iconvlist): Test p->name against NULL, not against "".
4+
Reported by Muraoka Taro <koron@tka.att.ne.jp>.
5+
16
2003-05-19 Bruno Haible <bruno@clisp.org>
27

38
* windows/iconv.rc: Include <winver.h>.

lib/iconv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ void iconvlist (int (*do_one) (unsigned int namescount,
506506
j = 0;
507507
for (i = 0; i < aliascount1; i++) {
508508
const struct alias * p = &aliases[i];
509-
if (p->name[0] != '\0'
509+
if (p->name != NULL
510510
&& p->encoding_index != ei_local_char
511511
&& p->encoding_index != ei_local_wchar_t)
512512
aliasbuf[j++] = *p;

0 commit comments

Comments
 (0)