*
* 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
}
/* 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;
}
* 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;
}