Fixed NULL pointer at end of scipt_tags[] array

SVN revision: 2199
This commit is contained in:
Stefan Ritt 2009-05-25 15:24:33 +00:00
parent 4ef3a2fad1
commit 76771b375e

View File

@ -5411,7 +5411,7 @@ int is_html(char *s)
char *script_tags[] = { "onerror", "onabort", "onchange", "onclick", "ondblclick", "onfocus", "onkeydown", char *script_tags[] = { "onerror", "onabort", "onchange", "onclick", "ondblclick", "onfocus", "onkeydown",
"onkeyup", "onload", "onmousedonw", "onmousemove", "onmouseover", "onmouseup", "onkeyup", "onload", "onmousedonw", "onmousemove", "onmouseover", "onmouseup",
"onreset", "onselect", "onsubmit", "onunload", "javascript" "onreset", "onselect", "onsubmit", "onunload", "javascript", NULL
}; };
int is_script(char *s) int is_script(char *s)
@ -5425,7 +5425,7 @@ int is_script(char *s)
str[i] = tolower(s[i]); str[i] = tolower(s[i]);
str[i] = 0; str[i] = 0;
for (i = 0; script_tags[i][0]; i++) { for (i = 0; script_tags[i] != NULL; i++) {
if (strstr(str, script_tags[i])) { if (strstr(str, script_tags[i])) {
xfree(str); xfree(str);
return TRUE; return TRUE;