projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Make sure we handle input NULL with length 0
[openssl.git]
/
providers
/
implementations
/
ciphers
/
cipher_aes_ocb.c
diff --git
a/providers/implementations/ciphers/cipher_aes_ocb.c
b/providers/implementations/ciphers/cipher_aes_ocb.c
index ba4e4f29f83e31616ef9ada3a4cb1444d402b26c..6b07caaa52e875677d43aff2b198c391b1e51ca3 100644
(file)
--- a/
providers/implementations/ciphers/cipher_aes_ocb.c
+++ b/
providers/implementations/ciphers/cipher_aes_ocb.c
@@
-214,6
+214,11
@@
static int aes_ocb_block_update(void *vctx, unsigned char *out, size_t *outl,
if (!ctx->key_set || !update_iv(ctx))
return 0;
+ if (inl == 0) {
+ *outl = 0;
+ return 1;
+ }
+
/* Are we dealing with AAD or normal data here? */
if (out == NULL) {
buf = ctx->aad_buf;