]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ngtcp2/osslq: remove NULL pointer dereferences
authormbuhl <git@moritzbuhl.de>
Tue, 27 Aug 2024 10:38:31 +0000 (12:38 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 27 Aug 2024 12:02:05 +0000 (14:02 +0200)
If data is NULL, then it does not make sense to pass it to failf.

Closes #14701

lib/vquic/curl_ngtcp2.c
lib/vquic/curl_osslq.c

index ee438ee643ef895f4d6794d9348d8266e86230e0..675094c288793470a1d05fb7ca52a4642dc58236 100644 (file)
@@ -226,10 +226,8 @@ static CURLcode h3_data_setup(struct Curl_cfilter *cf,
   struct cf_ngtcp2_ctx *ctx = cf->ctx;
   struct h3_stream_ctx *stream = H3_STREAM_CTX(ctx, data);
 
-  if(!data) {
-    failf(data, "initialization failure, transfer not http initialized");
+  if(!data)
     return CURLE_FAILED_INIT;
-  }
 
   if(stream)
     return CURLE_OK;
index 157dd9c9077a5a868dde581c6022637ae45f1fbd..5246db31d6d88940fe9626cb8b1907aad70c1b0a 100644 (file)
@@ -612,10 +612,8 @@ static CURLcode h3_data_setup(struct Curl_cfilter *cf,
   struct cf_osslq_ctx *ctx = cf->ctx;
   struct h3_stream_ctx *stream = H3_STREAM_CTX(ctx, data);
 
-  if(!data) {
-    failf(data, "initialization failure, transfer not http initialized");
+  if(!data)
     return CURLE_FAILED_INIT;
-  }
 
   if(stream)
     return CURLE_OK;