From b0cd8f6703645ac2eafd65e841c5f06458a7c319 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 73cc25629..9bfed470e 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));