diff options
Diffstat (limited to 'crypto/idea/i_cfb64.c')
-rw-r--r-- | crypto/idea/i_cfb64.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/crypto/idea/i_cfb64.c b/crypto/idea/i_cfb64.c index 61c723015b99..afea89edfa08 100644 --- a/crypto/idea/i_cfb64.c +++ b/crypto/idea/i_cfb64.c @@ -1,12 +1,19 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-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 */ +/* + * IDEA low level APIs are deprecated for public use, but still ok for internal + * use where we're using them to implement the higher level EVP interface, as is + * the case here. + */ +#include "internal/deprecated.h" + #include <openssl/idea.h> #include "idea_local.h" @@ -26,6 +33,11 @@ void IDEA_cfb64_encrypt(const unsigned char *in, unsigned char *out, unsigned long ti[2]; unsigned char *iv, c, cc; + if (n < 0) { + *num = -1; + return; + } + iv = (unsigned char *)ivec; if (encrypt) { while (l--) { |