summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/apps/enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/apps/enc.c')
-rw-r--r--crypto/openssl/apps/enc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/openssl/apps/enc.c b/crypto/openssl/apps/enc.c
index f4f9a4c..8f5e5b8 100644
--- a/crypto/openssl/apps/enc.c
+++ b/crypto/openssl/apps/enc.c
@@ -226,7 +226,12 @@ int MAIN(int argc, char **argv)
goto bad;
}
buf[0]='\0';
- fgets(buf,sizeof buf,infile);
+ if (!fgets(buf,sizeof buf,infile))
+ {
+ BIO_printf(bio_err,"unable to read key from '%s'\n",
+ file);
+ goto bad;
+ }
fclose(infile);
i=strlen(buf);
if ((i > 0) &&
OpenPOWER on IntegriCloud