summaryrefslogtreecommitdiffstats
path: root/apps/enc.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-10-04 16:42:56 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-10-04 16:42:56 +0000
commit0e039aa7976eb2278339441125473d7219bee413 (patch)
treecbdc049f9c280a52366b89d62b03a363e02f9e46 /apps/enc.c
parentc21869fb07ea02ffd46e817caeb47d85a85ee8ef (diff)
Fix warnings about ignoring fgets return value
Diffstat (limited to 'apps/enc.c')
-rw-r--r--apps/enc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/enc.c b/apps/enc.c
index 53de51ad72..3c2c91e920 100644
--- a/apps/enc.c
+++ b/apps/enc.c
@@ -243,7 +243,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) &&