From 8ba602707309fde8ba0a9fab001176aa2e401bd7 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Sat, 8 Jan 2022 00:28:35 -0600 Subject: [PATCH] src/wolfio.c: fixes for cppcheck complaints: nullPointer uninitvar --- src/wolfio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wolfio.c b/src/wolfio.c index 7fd72fb38..8480562ce 100644 --- a/src/wolfio.c +++ b/src/wolfio.c @@ -1234,7 +1234,7 @@ int wolfIO_HttpProcessResponse(int sfd, const char** appStrList, } /* read data if no \r\n or first time */ - if (end == NULL) { + if ((start == NULL) || (end == NULL)) { result = wolfIO_Recv(sfd, (char*)httpBuf+len, httpBufSz-len-1, 0); if (result > 0) { len += result; @@ -2577,7 +2577,7 @@ int LwIPNativeReceive(WOLFSSL* ssl, char* buf, int sz, void* ctx) WOLFSSL_LWIP_NATIVE_STATE* nlwip; int ret = 0; - if (nlwip == NULL || ctx == NULL) { + if (ctx == NULL) { return WOLFSSL_CBIO_ERR_GENERAL; } nlwip = (WOLFSSL_LWIP_NATIVE_STATE*)ctx;