summaryrefslogtreecommitdiff
path: root/apps/cms.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/cms.c')
-rw-r--r--apps/cms.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/cms.c b/apps/cms.c
index 58ce54e454..714cf3e4ff 100644
--- a/apps/cms.c
+++ b/apps/cms.c
@@ -278,6 +278,8 @@ static void warn_binary(const char *file)
unsigned char linebuf[1024], *cur, *end;
int len;
+ if (file == NULL)
+ return; /* cannot give a warning for stdin input */
if ((bio = bio_open_default(file, 'r', FORMAT_BINARY)) == NULL)
return; /* cannot give a proper warning since there is an error */
while ((len = BIO_read(bio, linebuf, sizeof(linebuf))) > 0) {