[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] uudecode doesn't work on files with DOS line endings
From: |
Bob Proulx |
Subject: |
Re: [PATCH] uudecode doesn't work on files with DOS line endings |
Date: |
Sun, 30 Apr 2006 09:02:43 -0600 |
User-agent: |
Mutt/1.5.9i |
Pavel Roskin wrote:
> With this patch, uuencoded files with DOS newlines are decoded
> correctly.
> if (fgets (buf, sizeof(buf), stdin) == NULL
> - || strcmp (buf, "end\n"))
> + || strncmp (buf, "end", 3))
> {
That seems too permissive to me. How about this?
if (fgets (buf, sizeof(buf), stdin) == NULL
|| strcmp (buf, "end\n")
|| strcmp (buf, "end\r\n"))
{
Bob
Re: [PATCH] uudecode doesn't work on files with DOS line endings,
Bob Proulx <=