blaze822: don't try to open /dev/stdin

Use the same check is blaze822() as in blaze822_file() to ensure that
we don't try to open /dev/stdin, which is non-POSIX.
Message-Id: <20220523170921.2623516-1-hi@alyssa.is>
pull/229/head
Alyssa Ross 2 years ago committed by Leah Neukirchen
parent 793e22ecb7
commit bb3dacc604

@ -443,7 +443,10 @@ blaze822(char *file)
if (!mesg)
return 0;
fd = open(file, O_RDONLY);
if (strcmp(file, "/dev/stdin") == 0)
fd = dup(0);
else
fd = open(file, O_RDONLY);
if (fd < 0) {
free(mesg);
return 0;

Loading…
Cancel
Save