Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit a018e5b8 authored by rswindell's avatar rswindell

Added NULL pointer (strdup failure) check for good measure.

parent fe51ed58
...@@ -341,13 +341,14 @@ void SMBCALL smb_parse_content_type(const char* content_type, char** subtype, ch ...@@ -341,13 +341,14 @@ void SMBCALL smb_parse_content_type(const char* content_type, char** subtype, ch
if((p = strstr(buf, "text/")) == buf) { if((p = strstr(buf, "text/")) == buf) {
p += 5; p += 5;
if(subtype != NULL) { if(subtype != NULL) {
*subtype = strdup(p); if((*subtype = strdup(p)) != NULL) {
char* tp = *subtype; char* tp = *subtype;
FIND_WHITESPACE(tp); FIND_WHITESPACE(tp);
*tp = 0; *tp = 0;
tp = *subtype; tp = *subtype;
FIND_CHAR(tp, ';'); FIND_CHAR(tp, ';');
*tp = 0; *tp = 0;
}
} }
if(charset != NULL && (p = strstr(p, "charset=")) != NULL) { if(charset != NULL && (p = strstr(p, "charset=")) != NULL) {
p += 8; p += 8;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment