projects
/
m17n
/
m17n-lib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a482753
)
(load_charset): Check the return value of fgets.
author
handa
<handa>
Thu, 18 Feb 2010 07:40:22 +0000
(07:40 +0000)
committer
handa
<handa>
Thu, 18 Feb 2010 07:40:22 +0000
(07:40 +0000)
src/charset.c
patch
|
blob
|
history
diff --git
a/src/charset.c
b/src/charset.c
index
73b5179
..
88649fd
100644
(file)
--- a/
src/charset.c
+++ b/
src/charset.c
@@
-353,7
+353,8
@@
load_charset (FILE *fp, MSymbol charset_name)
char buf[256];
ungetc (c, fp);
- fgets (buf, 256, fp);
+ if (! fgets (buf, 256, fp))
+ break;
if (c != '#')
{
if (sscanf (buf, "0x%x-0x%x 0x%x", &code1, &code2, &c1) == 3)