projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Check the return from OPENSSL_buf2hexstr()
[oweals/openssl.git]
/
apps
/
kdf.c
diff --git
a/apps/kdf.c
b/apps/kdf.c
index 66e7e7a7c1e34e41c9a590333d69010374d88606..82818f1ff3e5046066255aa7594565da5abf7682 100644
(file)
--- a/
apps/kdf.c
+++ b/
apps/kdf.c
@@
-138,6
+138,10
@@
opthelp:
BIO_write(out, dkm_bytes, dkm_len);
} else {
hexout = OPENSSL_buf2hexstr(dkm_bytes, dkm_len);
+ if (hexout == NULL) {
+ BIO_printf(bio_err, "Memory allocation failure\n");
+ goto err;
+ }
BIO_printf(out, "%s\n\n", hexout);
}