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,7 +341,7 @@ void SMBCALL smb_parse_content_type(const char* content_type, char** subtype, ch
if((p = strstr(buf, "text/")) == buf) {
p += 5;
if(subtype != NULL) {
*subtype = strdup(p);
if((*subtype = strdup(p)) != NULL) {
char* tp = *subtype;
FIND_WHITESPACE(tp);
*tp = 0;
......@@ -349,6 +349,7 @@ void SMBCALL smb_parse_content_type(const char* content_type, char** subtype, ch
FIND_CHAR(tp, ';');
*tp = 0;
}
}
if(charset != NULL && (p = strstr(p, "charset=")) != NULL) {
p += 8;
if(*p == '"')
......
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