Thu, 03 Aug 2017 11:43:04 +0200
fixes crash when using invalid namespace prefix
libidav/resource.c | file | annotate | diff | comparison | revisions |
--- a/libidav/resource.c Thu Aug 03 11:38:41 2017 +0200 +++ b/libidav/resource.c Thu Aug 03 11:43:04 2017 +0200 @@ -405,10 +405,16 @@ char *pns; char *pname; dav_get_property_namespace_str(res->session->context, name, &pns, &pname); + if(!pns || !pname) { + return NULL; + } return dav_get_property_ns(res, pns, pname); } char* dav_get_property_ns(DavResource *res, char *ns, char *name) { + if(!ns || !name) { + return NULL; + } char *property = resource_get_property(res, ns, name); DavResourceData *data = res->data; // resource_get_property only returns persistent properties