Skip to content

Commit e503ccc

Browse files
committed
prevent (inaccurate) malloc range warning
1 parent d374a57 commit e503ccc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inifile/inifile.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static char *trimstr(char *s, char *end)
2525
else
2626
break;
2727
}
28-
if (end == s) return NULL;
28+
if (end <= s) return NULL;
2929

3030
t = str = (char *) malloc(end - s + 1);
3131
while (s < end)

0 commit comments

Comments
 (0)