Skip to content

Commit

Permalink
iniparser: Prevent possible NULL ptr deref.
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgi Chorbadzhiyski committed Feb 2, 2015
1 parent ee14920 commit a0000ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion iniparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,9 @@ static line_status iniparser_line(
* key=;
* key=#
*/
strcpy(key, strstrip(key));
char *skey = strstrip(key);
if (skey)
strcpy(key, skey);
strcpy(key, strlwc(key));
value[0]=0 ;
sta = LINE_VALUE ;
Expand Down

0 comments on commit a0000ff

Please sign in to comment.