coverity: 1462544 Dereference after null check
authorPauli <paul.dale@oracle.com>
Sun, 26 Apr 2020 22:21:06 +0000 (08:21 +1000)
committerPauli <paul.dale@oracle.com>
Thu, 30 Apr 2020 10:21:31 +0000 (20:21 +1000)
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11651)

providers/implementations/ciphers/cipher_aes_ocb.c

index 8d7f8956fc136368055258399932dfe6e0583942..859f3524a4ed942fbb1593f0540b21fe7e6a2f6e 100644 (file)
@@ -153,7 +153,7 @@ static int aes_ocb_block_update_internal(PROV_AES_OCB_CTX *ctx,
     size_t nextblocks;
     size_t outlint = 0;
 
-    if (bufsz != 0)
+    if (*bufsz != 0)
         nextblocks = fillblock(buf, bufsz, AES_BLOCK_SIZE, &in, &inl);
     else
         nextblocks = inl & ~(AES_BLOCK_SIZE-1);