[libmusicbrainz-discid-perl] 02/04: add a test for offsets overflowing

Damyan Ivanov dmn at moszumanska.debian.org
Tue Aug 19 18:19:53 UTC 2014


This is an automated email from the git hooks/post-receive script.

dmn pushed a commit to branch master
in repository libmusicbrainz-discid-perl.

commit 120bb0245503147722f22b5559123b4a3192b0ac
Author: Damyan Ivanov <dmn at debian.org>
Date:   Tue Aug 19 18:11:44 2014 +0000

    add a test for offsets overflowing
---
 debian/patches/stack-corruption-discid_put.patch | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/debian/patches/stack-corruption-discid_put.patch b/debian/patches/stack-corruption-discid_put.patch
index 084fa03..db727b7 100644
--- a/debian/patches/stack-corruption-discid_put.patch
+++ b/debian/patches/stack-corruption-discid_put.patch
@@ -33,3 +33,24 @@ Bug-Debian: https://bugs.debian.org/758216
          offsets[i-2] = (int)SvIV(ST(i));
      }
      offsets[0] = sectors;
+--- a/t/10discid.t
++++ b/t/10discid.t
+@@ -5,7 +5,7 @@ use strict;
+ use Test::More;
+ 
+ # use a BEGIN block so we print our plan before modules are loaded
+-BEGIN { plan tests => 54 }
++BEGIN { plan tests => 56 }
+ 
+ # load modules
+ use MusicBrainz::DiscID;
+@@ -16,6 +16,9 @@ my $disc = new MusicBrainz::DiscID();
+ ok( $disc );
+ is(ref $disc, 'MusicBrainz::DiscID');
+ 
++ok( !$disc->put( 1, 140, 1 .. 100 ) );
++
++is( $disc->error_msg, "Illegal track limits" );
+ 
+ ok( $disc->put( 1, 303602,
+                 150, 9700, 25887, 39297, 53795, 63735, 77517, 94877, 107270,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmusicbrainz-discid-perl.git



More information about the Pkg-perl-cvs-commits mailing list