summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2019-06-28 16:29:42 +0100
committerMatt Caswell <matt@openssl.org>2019-07-01 10:18:37 +0100
commit9a131ad7477f85d40ee96853e60d0de86f5f4e09 (patch)
treeb6fad564674f3cd12da7f9c617fa4c78ed943f48 /apps
parent792cb4ee8d82e4b063f707fc9f4992271ffd65ab (diff)
Change RC5_32_set_key to return an int type
If the key is too long we now return an error. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/8834)
Diffstat (limited to 'apps')
-rw-r--r--apps/speed.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/speed.c b/apps/speed.c
index 5f16b13954..0f3ca9ca76 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -1985,7 +1985,10 @@ int speed_main(int argc, char **argv)
RC2_set_key(&rc2_ks, 16, key16, 128);
#endif
#ifndef OPENSSL_NO_RC5
- RC5_32_set_key(&rc5_ks, 16, key16, 12);
+ if (!RC5_32_set_key(&rc5_ks, 16, key16, 12)) {
+ BIO_printf(bio_err, "Failed setting RC5 key\n");
+ goto end;
+ }
#endif
#ifndef OPENSSL_NO_BF
BF_set_key(&bf_ks, 16, key16);