Skip to content

Commit

Permalink
Merge pull request #16 from Recycler1993/upstream
Browse files Browse the repository at this point in the history
Fix for falsely diagnosed buffer overflow when EOF without newline is re...
  • Loading branch information
ndevilla committed May 21, 2012
2 parents 6548cda + d9c4bfa commit 2e01cec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/iniparser.c
Expand Up @@ -666,7 +666,7 @@ dictionary * iniparser_load(const char * ininame)
if (len==0) if (len==0)
continue; continue;
/* Safety check against buffer overflows */ /* Safety check against buffer overflows */
if (line[len]!='\n') { if (line[len]!='\n' && !feof(in)) {
fprintf(stderr, fprintf(stderr,
"iniparser: input line too long in %s (%d)\n", "iniparser: input line too long in %s (%d)\n",
ininame, ininame,
Expand Down

0 comments on commit 2e01cec

Please sign in to comment.