From: Daniel Stenberg Date: Tue, 6 May 2025 09:05:30 +0000 (+0200) Subject: pop3: add null pointer check X-Git-Tag: curl-8_14_0~154 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f7c544d867113cbc3d946d40995b5315e16c26af;p=thirdparty%2Fcurl.git pop3: add null pointer check Pointed out by Coverity. A precaution to catch internal errors. Follow-up to 76d13c721bcd992e3e19f52 Closes #17255 --- diff --git a/lib/pop3.c b/lib/pop3.c index 5dac0f9557..28ed7af04f 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -311,6 +311,9 @@ static bool pop3_endofresp(struct Curl_easy *data, struct connectdata *conn, { struct pop3_conn *pop3c = Curl_conn_meta_get(conn, CURL_META_POP3_CONN); (void)data; + DEBUGASSERT(pop3c); + if(!pop3c) /* internal error */ + return TRUE; /* Do we have an error response? */ if(len >= 4 && !memcmp("-ERR", line, 4)) {