Check for NULL pointer before calling strcasecmp in GetVersFromFPI

This commit is contained in:
Ryan Kistner 2012-04-12 14:18:10 -06:00 committed by Michael[tm] Smith
parent 21f5b68778
commit 8025154e30

View file

@ -180,7 +180,7 @@ static uint GetVersFromFPI(ctmbstr fpi)
uint i; uint i;
for (i = 0; W3C_Doctypes[i].name; ++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 W3C_Doctypes[i].vers;
return 0; return 0;