mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
wolfcrypt/src/sha512.c: fixes for cppcheck complaints: nullPointerRedundantCheck
This commit is contained in:
@@ -956,13 +956,15 @@ int wc_Sha512Update(wc_Sha512* sha512, const byte* data, word32 len)
|
||||
|
||||
static WC_INLINE int Sha512Final(wc_Sha512* sha512)
|
||||
{
|
||||
byte* local = (byte*)sha512->buffer;
|
||||
byte* local;
|
||||
int ret;
|
||||
|
||||
if (sha512 == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
local = (byte*)sha512->buffer;
|
||||
|
||||
local[sha512->buffLen++] = 0x80; /* add 1 */
|
||||
|
||||
/* pad with zeros */
|
||||
|
Reference in New Issue
Block a user