Skip to content
Snippets Groups Projects
Commit 6dd2aedb 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 72b17e66
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #618 passed
...@@ -367,7 +367,8 @@ void SMBCALL smb_parse_content_type(const char* content_type, char** subtype, ch ...@@ -367,7 +367,8 @@ void SMBCALL smb_parse_content_type(const char* content_type, char** subtype, ch
*tp = 0; *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; BOOL quoted = FALSE;
p += 9; p += 9;
if(*p == '"') { if(*p == '"') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment