提交 d9c4bfac 编写于 作者: C Christian Semmler

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

上级 6548cda6
...@@ -666,7 +666,7 @@ dictionary * iniparser_load(const char * ininame) ...@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册