Package: mawk
Version: 1.3.3-16
Severity: serious
Tags: upstream patch

Hi,

RC because this causes at least one other package to FTBFS with the current
libc in sid.  See #628247 for more details of that.

We'd originally thought that was due to the output files being mashed during
parallel builds, but the most recent rebuilds that Lucas did also proved that
the exact same results could be reproduced with current libc on a single core
system with a -j1 build.

After further investigation, it turns out the recent changes to memcpy in libc
have triggered a latent bug in mawk, making it mash the memory copied between
overlapping regions.

The existence of the bug in mawk was confirmed by valgrind, and the following
patch is confirmed to fix the error that resulted from it.  The code paths in
mawk exercised by sofia-sip don't shake out any other instances of this, but
I haven't exhaustively scanned the mawk code for any others at this stage.

Cheers,
Ron


--- fin.c.orig  2012-03-24 02:40:41.000000000 +1030
+++ fin.c       2012-03-24 02:40:46.000000000 +1030
@@ -328,7 +328,7 @@
       /* move a partial line to front of buffer and try again */
       unsigned rr ;
 
-      p = (char *) memcpy(fin->buff, p, r = strlen(p)) ;
+      p = (char *) memmove(fin->buff, p, r = strlen(p)) ;
       q = p+r ;         rr = fin->nbuffs*BUFFSZ - r ;
 
       if ((r = fillbuff(fin->fd, q, rr)) < rr)



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to