Fix instances of pointer addition with the NULL pointer
[openssl.git] / providers / implementations / ciphers / cipher_aes_ocb.c
index 7cb3f6a764b4f0b3a51d9df8d983d1721111b4fb..fa2c014a01ec7614456b7827fb4f1ed2aceba499 100644 (file)
@@ -177,7 +177,8 @@ static int aes_ocb_block_update_internal(PROV_AES_OCB_CTX *ctx,
         }
         *bufsz = 0;
         outlint = AES_BLOCK_SIZE;
-        out += AES_BLOCK_SIZE;
+        if (out != NULL)
+            out += AES_BLOCK_SIZE;
     }
     if (nextblocks > 0) {
         outlint += nextblocks;