summaryrefslogtreecommitdiff
path: root/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch
blob: f6488810ac122a48bd248d8c1d491ed3320d2615 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/src/iniparser.c
+++ b/src/iniparser.c
@@ -663,7 +663,7 @@
     while (fgets(line+last, ASCIILINESZ-last, in)!=NULL) {
         lineno++ ;
         len = (int)strlen(line)-1;
-        if (len==0)
+        if (len<=0)
             continue;
         /* Safety check against buffer overflows */
         if (line[len]!='\n') {