From a53eb4d4fef4fded0b632bd64b0f2929f1fb1715 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 8 Nov 2021 09:56:55 +0000 Subject: [PATCH] ss-h1: coverity: add needless header NULL check Coverity does not understand that once we checked that the header has a non-zero length, the associated pointer can never be NULL. Add a pointless check to make it happy. --- lib/secure-streams/protocols/ss-h1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/secure-streams/protocols/ss-h1.c b/lib/secure-streams/protocols/ss-h1.c index 9d8e644d8..0e5d1e38d 100644 --- a/lib/secure-streams/protocols/ss-h1.c +++ b/lib/secure-streams/protocols/ss-h1.c @@ -326,7 +326,7 @@ lws_extract_metadata(lws_ss_handle_t *h, struct lws *wsi) const char *cp = lws_hdr_simple_ptr(wsi, polmd->value_is_http_token); omd = lws_ss_get_handle_metadata(h, polmd->name); - if (!omd) + if (!omd || !cp) return 1; assert(!strcmp(omd->name, polmd->name));