]> granicus.if.org Git - curl/commitdiff
Curl_pipeline_server_blacklisted: handle a NULL server name
authorDaniel Stenberg <daniel@haxx.se>
Fri, 3 Oct 2014 21:40:57 +0000 (23:40 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 3 Oct 2014 21:40:57 +0000 (23:40 +0200)
Coverity CID 1215284. The server name is extracted with
Curl_copy_header_value() and passed in to this function, and
copy_header_value can actually can fail and return NULL.

lib/pipeline.c

index 8d2544b83aadb72b4e0cce0174a5e06e3c4ad8d9..270df4192a8dd279a6c8dc5d0c6e8d2e4ca4e52c 100644 (file)
@@ -251,7 +251,7 @@ CURLMcode Curl_pipeline_set_site_blacklist(char **sites,
 bool Curl_pipeline_server_blacklisted(struct SessionHandle *handle,
                                       char *server_name)
 {
-  if(handle->multi) {
+  if(handle->multi && server_name) {
     struct curl_llist *blacklist =
       Curl_multi_pipelining_server_bl(handle->multi);