Check ptr to url after allocation to prevent null pointer
dereference
Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
&uri_buf, strlen(location) + 1,
&auth_buf, auth_str ? strlen(auth_str) + 1 : 0);
&uri_buf, strlen(location) + 1,
&auth_buf, auth_str ? strlen(auth_str) + 1 : 0);
+ if (!url)
+ return NULL;
+
url->backend = backend;
url->location = strcpy(uri_buf, location);
if (host)
url->backend = backend;
url->location = strcpy(uri_buf, location);
if (host)