🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #152

Bugs in shellutils-1.6: pathchk and printf

#152
From: Andreas Schwab
Date: Wed, 15 Apr 1992 14:39
36 lines
1550 bytes
* pathchk.c (validate_new_path): the error message is misleading if a
component of the path exceeds the limit
* printf.c (print_esc): escape sequences are not handled correctly
(try printf 'a\012b\n')

diff -ur orig/pathchk.c ./pathchk.c
--- orig/pathchk.c	Tue Dec 24 08:09:22 1991
+++ ./pathchk.c	Wed Apr 15 15:44:00 1992
@@ -265,7 +265,7 @@
       if (length > name_max)
 	{
 	  error (0, 0, "name `%s' has length %d; exceeds limit of %d",
-		 path, length, name_max);
+		 start, length, name_max);
 	  return 1;
 	}
       if (last_elem)
diff -ur orig/printf.c ./printf.c
--- orig/printf.c	Fri Aug 30 07:22:45 1991
+++ ./printf.c	Wed Apr 15 15:44:48 1992
@@ -208,8 +208,9 @@
     }
   else if (!index ("\"\\abcfnrtv", *p))
     error (1, 0, "\\%c: invalid escape", *p);
-  print_esc_char (*p);
-  return p - escstart;
+  else
+    print_esc_char (*p++);
+  return p - escstart - 1;
 }
 
 /* Output a single-character \ escape.  */

--
Andreas Schwab
schwab@ls5.informatik.uni-dortmund.de
Technical Details
Message-ID: <shf6lINNq6h@fbi-news.Informatik.Uni-Dortmund.DE>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!mouton.informatik.uni-dortmund.de!schwab

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!mouton.informatik.uni-dortmund.de!schwab
From: schwab@mouton.informatik.uni-dortmund.de (Andreas Schwab)
Subject: Bugs in shellutils-1.6: pathchk and printf
Message-ID: <shf6lINNq6h@fbi-news.Informatik.Uni-Dortmund.DE>
Sender: gnulists@ai.mit.edu
Reply-To: schwab@ls5.informatik.uni-dortmund.de
Organization: University of Dortmund, Germany
Distribution: gnu
Date: Wed, 15 Apr 1992 14:39:17 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 37