bug-gnu-utils
[Top][All Lists]
Advanced

[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: Bruce Korb
Subject: Re: [PATCH] uudecode doesn't work on files with DOS line endings
Date: Sun, 30 Apr 2006 08:16:25 -0700
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

Bob Proulx wrote:
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"))
    {

That's actually what I've done.  I'm about to leave for
vacation, so it'll probably be a couple of weeks before
I go through all the mechanics.  Cheers - Bruce




reply via email to

[Prev in Thread] Current Thread [Next in Thread]