diff options
Diffstat (limited to 'crypto/modes/cfb128.c')
-rw-r--r-- | crypto/modes/cfb128.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/crypto/modes/cfb128.c b/crypto/modes/cfb128.c index b2530007b6e4..2d37bcb586fd 100644 --- a/crypto/modes/cfb128.c +++ b/crypto/modes/cfb128.c @@ -1,15 +1,15 @@ /* - * Copyright 2008-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-2021 The OpenSSL Project Authors. All Rights Reserved. * - * Licensed under the OpenSSL license (the "License"). You may not use + * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ -#include <openssl/crypto.h> -#include "modes_local.h" #include <string.h> +#include <openssl/crypto.h> +#include "crypto/modes.h" #if defined(__GNUC__) && !defined(STRICT_ALIGNMENT) typedef size_t size_t_aX __attribute((__aligned__(1))); @@ -30,6 +30,11 @@ void CRYPTO_cfb128_encrypt(const unsigned char *in, unsigned char *out, unsigned int n; size_t l = 0; + if (*num < 0) { + /* There is no good way to signal an error return from here */ + *num = -1; + return; + } n = *num; if (enc) { |