From: Patrick Steuer Date: Fri, 1 Nov 2019 13:58:36 +0000 (+0100) Subject: Dont pass zero length input to asm modules for ciphers X-Git-Tag: openssl-3.0.0-alpha1~930 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=51356a066e936354c817097cf873f4974bbea291;p=oweals%2Fopenssl.git Dont pass zero length input to asm modules for ciphers The asm modules may assume an input length > 0. Fixes: #9262 Signed-off-by: Patrick Steuer Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/10323) --- diff --git a/providers/common/ciphers/cipher_common.c b/providers/common/ciphers/cipher_common.c index fe4560192d..8f39a168c8 100644 --- a/providers/common/ciphers/cipher_common.c +++ b/providers/common/ciphers/cipher_common.c @@ -207,6 +207,8 @@ int cipher_generic_block_update(void *vctx, unsigned char *out, size_t *outl, ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL); return 0; } + } + if (nextblocks > 0) { if (!ctx->hw->cipher(ctx, out, in, nextblocks)) { ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED); return 0;