--- fw_appid.c.orig 2014-03-09 17:02:32.881416925 -0700 +++ fw_appid.c 2014-03-09 17:12:13.843254187 -0700 @@ -757,6 +757,10 @@ if (headers->url.start) { session->url = malloc(sizeof("http://") + headers->host.len + headers->url.len); + if (session->url == NULL) { /* oops, malloc() failed */ + _dpd.errMsg("Failed to allocate session->url memory."); + return; + } strcpy(session->url, "http://"); strncat(session->url, (char *)headers->host.start, headers->host.len); strncat(session->url, (char *)headers->url.start, headers->url.len);