Treat 'end\0', 'end\n', 'end\r\n' as trailer line, see rev 1.2

This commit is contained in:
wosch 1997-02-18 20:19:04 +00:00
parent ecb2d8d8e0
commit adc9806068

View File

@ -255,7 +255,9 @@ decode2(flag)
} }
} }
} }
if (!fgets(buf, sizeof(buf), stdin) || strncmp(buf, "end", 3) || (buf[3] && buf[3] != '\n')) { if (fgets(buf, sizeof(buf), stdin) == NULL ||
(strcmp(buf, "end") && strcmp(buf, "end\n") &&
strcmp(buf, "end\r\n"))) {
(void)fprintf(stderr, "uudecode: %s: no \"end\" line.\n", (void)fprintf(stderr, "uudecode: %s: no \"end\" line.\n",
filename); filename);
return(1); return(1);