Permalink
Browse files

Fix for falsely diagnosed buffer overflow when EOF without newline is…

… reached
  • Loading branch information...
foxtacles committed May 21, 2012
1 parent 6548cda commit d9c4bfac16b98503e64285a3a6e850a89ace6d92
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/iniparser.c
View
@@ -666,7 +666,7 @@ dictionary * iniparser_load(const char * ininame)
if (len==0)
continue;
/* Safety check against buffer overflows */
- if (line[len]!='\n') {
+ if (line[len]!='\n' && !feof(in)) {
fprintf(stderr,
"iniparser: input line too long in %s (%d)\n",
ininame,

0 comments on commit d9c4bfa

Please sign in to comment.