summaryrefslogtreecommitdiffstats
path: root/apps/enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/enc.c')
-rw-r--r--apps/enc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/enc.c b/apps/enc.c
index 076225c4cb..8c5527783b 100644
--- a/apps/enc.c
+++ b/apps/enc.c
@@ -549,9 +549,13 @@ bad:
sptr = salt;
}
- EVP_BytesToKey(cipher,dgst,sptr,
- (unsigned char *)str,
- strlen(str),1,key,iv);
+ if (!EVP_BytesToKey(cipher,dgst,sptr,
+ (unsigned char *)str,
+ strlen(str),1,key,iv))
+ {
+ BIO_printf(bio_err, "EVP_BytesToKey failed\n");
+ goto end;
+ }
/* zero the complete buffer or the string
* passed from the command line
* bug picked up by