Your message dated Wed, 12 Dec 2007 06:32:10 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#451361: fixed in pax 1:1.5-16
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: pax
Version: 1:1.5-15
Severity: important
Tags: patch


Hi ya

$ touch foobar
$ echo foobar | pax -rwds '/.*/&&/P' .
pax: Replacement name error foobar

This is because the resub() function that does the replacement,
upon a '&', attempts to copy data from the _pattern_ string
(above: ".*") instead of the input data "foobar". So, above, it
tries to copy 6 bytes (as in "foobar") from ".*" and obviously
fails.

Here is a patch:

diff -pur pax-1.5.orig/pat_rep.c pax-1.5/pat_rep.c
--- pax-1.5.orig/pat_rep.c      1998-12-03 04:35:52.000000000 +0000
+++ pax-1.5/pat_rep.c   2007-11-15 11:02:19.729489995 +0000
@@ -85,7 +85,7 @@ static char * range_match __P((register 
 #ifdef NET2_REGEX
 static int resub __P((regexp *, char *, char *, register char *));
 #else
-static int resub __P((regex_t *, regmatch_t *, char *, char *, char *));
+static int resub __P((regex_t *, regmatch_t *, char *, char *, char *, char 
*));
 #endif
 
 /*
@@ -1020,7 +1020,7 @@ rep_name(name, nlen, prnt)
 #                      ifdef NET2_REGEX
                        if ((res = resub(pt->rcmp,pt->nstr,outpt,endpt)) < 0) {
 #                      else
-                       if ((res = resub(&(pt->rcmp),pm,pt->nstr,outpt,endpt))
+                       if ((res = 
resub(&(pt->rcmp),pm,inpt,pt->nstr,outpt,endpt))
                            < 0) {
 #                      endif
                                if (prnt)
@@ -1172,7 +1172,7 @@ resub(prog, src, dest, destend)
 
 #ifdef __STDC__
 static int
-resub(regex_t *rp, register regmatch_t *pm, char *src, char *dest,
+resub(regex_t *rp, register regmatch_t *pm, char *orig, char *src, char *dest,
        register char *destend)
 #else
 static int
@@ -1231,7 +1231,7 @@ resub(rp, pm, src, dest, destend)
                 */
                if (len > (destend - dpt))
                        len = destend - dpt;
-               if (l_strncpy(dpt, src + pmpt->rm_so, len) != len)
+               if (l_strncpy(dpt, orig + pmpt->rm_so, len) != len)
                        return(-1);
                dpt += len;
        }
-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.23.1 (SMP w/2 CPU cores)
Locale: LANG=en_GB.ISO-8859-15, LC_CTYPE=en_GB.ISO-8859-15 (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

Versions of packages pax depends on:
ii  libc6                         2.6.1-6    GNU C Library: Shared libraries

pax recommends no packages.

-- no debconf information
diff -pur pax-1.5.orig/pat_rep.c pax-1.5/pat_rep.c
--- pax-1.5.orig/pat_rep.c	1998-12-03 04:35:52.000000000 +0000
+++ pax-1.5/pat_rep.c	2007-11-15 11:02:19.729489995 +0000
@@ -85,7 +85,7 @@ static char * range_match __P((register 
 #ifdef NET2_REGEX
 static int resub __P((regexp *, char *, char *, register char *));
 #else
-static int resub __P((regex_t *, regmatch_t *, char *, char *, char *));
+static int resub __P((regex_t *, regmatch_t *, char *, char *, char *, char *));
 #endif
 
 /*
@@ -1020,7 +1020,7 @@ rep_name(name, nlen, prnt)
 #			ifdef NET2_REGEX
 			if ((res = resub(pt->rcmp,pt->nstr,outpt,endpt)) < 0) {
 #			else
-			if ((res = resub(&(pt->rcmp),pm,pt->nstr,outpt,endpt))
+			if ((res = resub(&(pt->rcmp),pm,inpt,pt->nstr,outpt,endpt))
 			    < 0) {
 #			endif
 				if (prnt)
@@ -1172,7 +1172,7 @@ resub(prog, src, dest, destend)
 
 #ifdef __STDC__
 static int
-resub(regex_t *rp, register regmatch_t *pm, char *src, char *dest,
+resub(regex_t *rp, register regmatch_t *pm, char *orig, char *src, char *dest,
 	register char *destend)
 #else
 static int
@@ -1231,7 +1231,7 @@ resub(rp, pm, src, dest, destend)
 		 */
 		if (len > (destend - dpt))
 			len = destend - dpt;
-		if (l_strncpy(dpt, src + pmpt->rm_so, len) != len)
+		if (l_strncpy(dpt, orig + pmpt->rm_so, len) != len)
 			return(-1);
 		dpt += len;
 	}

--- End Message ---
--- Begin Message ---
Source: pax
Source-Version: 1:1.5-16

We believe that the bug you reported is fixed in the latest version of
pax, which is due to be installed in the Debian FTP archive:

pax_1.5-16.diff.gz
  to pool/main/p/pax/pax_1.5-16.diff.gz
pax_1.5-16.dsc
  to pool/main/p/pax/pax_1.5-16.dsc
pax_1.5-16_i386.deb
  to pool/main/p/pax/pax_1.5-16_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bdale Garbee <[EMAIL PROTECTED]> (supplier of updated pax package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 11 Dec 2007 23:13:03 -0700
Source: pax
Binary: pax
Architecture: source i386
Version: 1:1.5-16
Distribution: unstable
Urgency: low
Maintainer: Bdale Garbee <[EMAIL PROTECTED]>
Changed-By: Bdale Garbee <[EMAIL PROTECTED]>
Description: 
 pax        - Portable Archive Interchange
Closes: 451361
Changes: 
 pax (1:1.5-16) unstable; urgency=low
 .
   * patch for -s irregularities from Stephane Chazelas, closes: #451361
   * clean up various lintian warnings
Files: 
 012ecd9332f13cb52c512803e0404f92 528 utils optional pax_1.5-16.dsc
 87a045c3534345a0dc7cc3b07c53be04 14416 utils optional pax_1.5-16.diff.gz
 fe6513ada90104e882851cc498d5ef2e 51790 utils optional pax_1.5-16_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHX300ZKfAp/LPAagRAlgdAJ0doyENf8uC7aSWi+++7o4p1r6GeACfYNcJ
DAraLxU9WCFEXt/uc9nn6Uc=
=C+h3
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to