Skip to content

Commit

Permalink
Fix upstream Issue #125
Browse files Browse the repository at this point in the history
Add null pointer check
  • Loading branch information
philrandal authored Jul 17, 2020
1 parent 80a4680 commit e5733fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions iniparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ int iniparser_getboolean(const dictionary * d, const char * key, int notfound)
char ch;

c = iniparser_getstring(d, key, INI_INVALID_KEY);
if (!c) return notfound;
if (c==INI_INVALID_KEY) return notfound ;
ch = tolower(c[0]);
if (ch=='y' || ch=='t' || ch=='1') {
Expand Down

0 comments on commit e5733fe

Please sign in to comment.