diff -u brasero-2.30.2/debian/changelog brasero-2.30.2/debian/changelog --- brasero-2.30.2/debian/changelog +++ brasero-2.30.2/debian/changelog @@ -1,3 +1,10 @@ +brasero (2.30.2-0ubuntu2) lucid-proposed; urgency=low + + * Apply patch to avoid the crash of the program due to wrong negative values + set in cd_text->hdr->len (LP: #501207). + + -- Alessio Treglia Thu, 25 Nov 2010 23:07:56 +0100 + brasero (2.30.2-0ubuntu1) lucid-proposed; urgency=low * New upstream release diff -u brasero-2.30.2/debian/patches/series brasero-2.30.2/debian/patches/series --- brasero-2.30.2/debian/patches/series +++ brasero-2.30.2/debian/patches/series @@ -3,2 +3,3 @@ 012_appindicator.patch +013_brasero.patch 99_autoconf.patch only in patch2: unchanged: --- brasero-2.30.2.orig/debian/patches/013_brasero.patch +++ brasero-2.30.2/debian/patches/013_brasero.patch @@ -0,0 +1,39 @@ +Description: Brasero crashes at audio CD insertion. + Some CD drives reports wrong cd_text->hdr->len values and this + leads to a negative value. + Check if 'size' < sizeof(BraseroScsiTocPmaAtipHdr), if so then + the function returns in order to avoid negative values. +Origin: upstream +Bug: https://bugzilla.gnome.org/show_bug.cgi?id=606010 +Bug-Ubuntu: https://launchpad.net/bugs/501207 +Applied-Upstream: yes, since release 2.30.3 +--- + libbrasero-media/brasero-medium.c | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +--- brasero-2.30.2.orig/libbrasero-media/brasero-medium.c ++++ brasero-2.30.2/libbrasero-media/brasero-medium.c +@@ -2791,10 +2791,19 @@ brasero_medium_read_CD_TEXT (BraseroMedi + return; + } + +- /* Get the number of CD-Text Data Packs */ +- num = (BRASERO_GET_16 (cd_text->hdr->len) - +- (sizeof (BraseroScsiTocPmaAtipHdr) - sizeof (cd_text->hdr->len))) / +- sizeof (BraseroScsiCDTextPackData); ++ /* Get the number of CD-Text Data Packs. ++ * Some drives seem to report an idiotic cd_text->hdr->len. So use size ++ * to be on a safer side. */ ++ if (size < sizeof (BraseroScsiTocPmaAtipHdr)) { ++ g_free (cd_text); ++ return; ++ } ++ ++ num = (size - sizeof (BraseroScsiTocPmaAtipHdr)) / sizeof (BraseroScsiCDTextPackData); ++ if (num <= 0) { ++ g_free (cd_text); ++ return; ++ } + + priv = BRASERO_MEDIUM_PRIVATE (self); +