mirror of
https://github.com/openssl/openssl.git
synced 2025-02-17 14:32:04 +08:00
cms: Do not try to check binary format on stdin
Fixes #16195 Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/16216)
This commit is contained in:
parent
204323446e
commit
f5c0f69619
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user