Make handling of 0 back compatible.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102162 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ben Laurie
2004-01-03 17:29:57 +00:00
parent 2ba0b5e158
commit 79bd8e5fc9

View File

@ -115,11 +115,11 @@ int main(int argc, char *argv[])
*
* Rem please keep in-sync with apr's list in win32/filesys.c
*/
if (strchr("&;`'\"|*?~<>^()[]{}$\\\n\r%", c)) {
if (c && strchr("&;`'\"|*?~<>^()[]{}$\\\n\r%", c)) {
flags |= T_ESCAPE_SHELL_CMD;
}
#else
if (strchr("&;`'\"|*?~<>^()[]{}$\\\n", c)) {
if (c && strchr("&;`'\"|*?~<>^()[]{}$\\\n", c)) {
flags |= T_ESCAPE_SHELL_CMD;
}
#endif
@ -133,7 +133,7 @@ int main(int argc, char *argv[])
}
/* these are the "tspecials" from RFC2068 */
if (apr_iscntrl(c) || strchr(" \t()<>@,;:\\/[]?={}", c)) {
if (c && (apr_iscntrl(c) || strchr(" \t()<>@,;:\\/[]?={}", c))) {
flags |= T_HTTP_TOKEN_STOP;
}
@ -142,7 +142,7 @@ int main(int argc, char *argv[])
* backslashes (because we use backslash for escaping)
* and 8-bit chars with the high bit set
*/
if (!apr_isprint(c) || c == '"' || c == '\\' || apr_iscntrl(c)) {
if (c && (!apr_isprint(c) || c == '"' || c == '\\' || apr_iscntrl(c))) {
flags |= T_ESCAPE_LOGITEM;
}