summaryrefslogtreecommitdiff
path: root/gdb/charset.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-02-07 15:42:33 +0000
committerTom Tromey <tromey@redhat.com>2012-02-07 15:42:33 +0000
commitc0f72f74c7d909e05de511d40a51b9faa9b4f5db (patch)
tree0baf7c443ac1a62d1edcd95218ad85413bbfafbb /gdb/charset.c
parentd5353e982f1cdda0ad5df5960b5c1c53c3db83a6 (diff)
downloadgdb-c0f72f74c7d909e05de511d40a51b9faa9b4f5db.tar.gz
* charset.c (find_charset_names): Check 'in' against NULL.
Diffstat (limited to 'gdb/charset.c')
-rw-r--r--gdb/charset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/charset.c b/gdb/charset.c
index 62977d11d00..16dab6b9fc0 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -839,7 +839,7 @@ find_charset_names (void)
parse the glibc and libiconv formats; feel free to add others
as needed. */
- while (!feof (in))
+ while (in != NULL && !feof (in))
{
/* The size of buf is chosen arbitrarily. */
char buf[1024];