Control: tag -1 + patch

On Mon, Aug 18, 2014 at 02:00:37PM +0300, Damyan Ivanov wrote:
> -=| Damyan Ivanov, 15.08.2014 16:06:45 +0300 |=-
> > Package: libmusicbrainz-discid-perl
> > Version: 0.03-4
> > Severity: serious
> > 
> > libmusicbrainz-discid-perl failed to build with today's round of binNMUs 
> > for 
> > perl 5.20:
> > 
> > Module::Build will be removed from the Perl core distribution in the next 
> > major release. Please install the separate libmodule-build-perl package. It 
> > is being used at Build, line 40.
> > t/00use.t ..... ok
> > t/05pod.t ..... ok
> > *** stack smashing detected ***: /usr/bin/perl terminated
> > ======= Backtrace: =========
> > /lib/s390x-linux-gnu/libc.so.6(+0x8787c)[0x3fffd31287c]
> > /lib/s390x-linux-gnu/libc.so.6(__fortify_fail+0x38)[0x3fffd399d70]
> > /lib/s390x-linux-gnu/libc.so.6(+0x10ed36)[0x3fffd399d36]
> > /«PKGBUILDDIR»/blib/arch/auto/MusicBrainz/DiscID/DiscID.so(+0x1946)[0x3fffd248946]
> > /usr/lib/s390x-linux-gnu/libperl.so.5.20(Perl_pp_entersub+0x5d4)[0x3fffd5e359c]
> 

The problem is due to a silly typo, here is a patch to fix the issue:

--- a/lib/MusicBrainz/DiscID.xs
+++ b/lib/MusicBrainz/DiscID.xs
@@ -127,7 +127,7 @@ discid_put( disc, first_track, sectors,
   PREINIT:
          int i, last_track, offsets[100];
   CODE:
-         for (i=0;i<100;i++);
+         for (i=0;i<100;i++)
              offsets[i] = 0;
     for (i=3; i<items; i++) {
         offsets[i-2] = (int)SvIV(ST(i));

The given the semi-colon after the for, the for loop is not executed.
Instead it is replaced by i=100. This means offset[100] is accessed,
which is bigger than the size of the array.

The problem is not new, and I guess it explain the testsuite failures
which happened depending on the compiler on mips/mipsel.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurel...@aurel32.net                 http://www.aurel32.net


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

Reply via email to