]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - apps/kdf.c
Check the return from OPENSSL_buf2hexstr()
[thirdparty/openssl.git] / apps / kdf.c
index 66e7e7a7c1e34e41c9a590333d69010374d88606..82818f1ff3e5046066255aa7594565da5abf7682 100644 (file)
@@ -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);
     }