Skip to content
Snippets Groups Projects
Commit a7ba442d authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix crashing bug introduced in previous commit of this file

Don't pass NULL to strcasestr().
parent d37bd8c8
No related branches found
No related tags found
No related merge requests found
......@@ -367,7 +367,8 @@ void SMBCALL smb_parse_content_type(const char* content_type, char** subtype, ch
*tp = 0;
}
}
if(charset != NULL && ((p = strcasestr(p, " charset=")) != NULL || (p = strcasestr(p, ";charset=")) != NULL)) {
char* parms = p;
if(charset != NULL && ((p = strcasestr(parms, " charset=")) != NULL || (p = strcasestr(parms, ";charset=")) != NULL)) {
BOOL quoted = FALSE;
p += 9;
if(*p == '"') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment