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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] uudecode doesn't work on files with DOS line endings


From: Pavel Roskin
Subject: [PATCH] uudecode doesn't work on files with DOS line endings
Date: Wed, 26 Apr 2006 14:12:43 -0400

Hello!

uudecode from GNU sharutils 4.6.2 cannot decode files with DOS newlines
because it expects "end" to be followed by the UNIX newline.  This
requirement should be relaxed, as it's not uncommon that files with DOS
newlines need to be decoded.

With this patch, uuencoded files with DOS newlines are decoded
correctly.

--- ChangeLog
+++ ChangeLog
@@ -1 +1,6 @@
+2006-04-26  Pavel Roskin  <address@hidden>
+
+       * uudecode.c (read_stduu): Allow characters other than '\n'
+       after "end", such as the DOS style newline "\r\n".
+
 2006-03-24  Santiago Vila  <address@hidden>
--- src/uudecode.c
+++ src/uudecode.c
@@ -162,7 +162,7 @@ read_stduu (inname, outname)
     }
 
   if (fgets (buf, sizeof(buf), stdin) == NULL
-      || strcmp (buf, "end\n"))
+      || strncmp (buf, "end", 3))
     {
       error (0, 0, _("%s: No `end' line"), inname);
       return 1;


-- 
Regards,
Pavel Roskin





reply via email to

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