Check for NULL pointer before calling strcasecmp in GetVersFromFPI
This commit is contained in:
parent
21f5b68778
commit
8025154e30
|
@ -180,7 +180,7 @@ static uint GetVersFromFPI(ctmbstr fpi)
|
|||
uint i;
|
||||
|
||||
for (i = 0; W3C_Doctypes[i].name; ++i)
|
||||
if (TY_(tmbstrcasecmp)(W3C_Doctypes[i].fpi, fpi) == 0)
|
||||
if (W3C_Doctypes[i].fpi != NULL && TY_(tmbstrcasecmp)(W3C_Doctypes[i].fpi, fpi) == 0)
|
||||
return W3C_Doctypes[i].vers;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue