Permalink
Browse files

Merge pull request #16 from Recycler1993/upstream

Fix for falsely diagnosed buffer overflow when EOF without newline is re...
  • Loading branch information...
2 parents 6548cda + d9c4bfa commit 2e01cec4f502c43f388c84a9aa2c05e6dffcadf0 @ndevilla committed May 21, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/iniparser.c
View
2 src/iniparser.c
@@ -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 2e01cec

Please sign in to comment.