summaryrefslogtreecommitdiff
path: root/apps/dgst.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dgst.c')
-rw-r--r--apps/dgst.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/dgst.c b/apps/dgst.c
index 6bf77d2ea8..8459c19625 100644
--- a/apps/dgst.c
+++ b/apps/dgst.c
@@ -448,6 +448,11 @@ int MAIN(int argc, char **argv)
ERR_print_errors(bio_err);
goto end;
}
+ if (!sigbuf) {
+ BIO_printf(bio_err, "Out of memory\n");
+ ERR_print_errors(bio_err);
+ goto end;
+ }
siglen = BIO_read(sigbio, sigbuf, siglen);
BIO_free(sigbio);
if (siglen <= 0) {