Bug 94554

Summary: [patch] cdda2wav from sysutils/cdrtools dumps core with some discs and parameter combinations
Product: Ports & Packages Reporter: Fabian Keil <freebsd-listen>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Fabian Keil 2006-03-16 15:09:53 UTC
The cdda2wav version from the port sysutils/cdrtools has a bug which
can lead to core dumps and/or wrong album titles if -cddb is used.

Some parameter combinations lead to core dumps,
others succeed with false cddb information.

The problem only affects a few discs, one of them is Janis Joplin's
"I Got Dem Ol' Kozmic Blues Again Mama!", the album title gets
overwritten with the title of track 5:

fk@TP51 ~/test/cdda2wav $/usr/ports/sysutils/cdrtools/work/cdrtools-2.01/cdda2wav/OBJ/i386-freebsd-cc/cdda2wav dev=1,0,0 -cddb 1 -J
Type: ROM, Vendor 'HL-DT-ST' Model 'RW/DVD GCC-4241N' Revision '1.04' MMC+CDDA
307200 bytes buffer memory requested, 4 buffers, 27 sectors
#Cdda2wav version 2.01_freebsd_6.1_i386_i386, real time sched., soundcard, libparanoia support
AUDIOtrack pre-emphasis  copy-permitted tracktype channels
      1-11           no              no     audio    2
Table of Contents: total tracks:11, (total time 51:43.15)
  1.( 3:57.50),  2.( 3:41.37),  3.( 4:12.00),  4.( 5:27.38),  5.( 5:14.37),
  6.( 4:24.25),  7.( 3:51.13),  8.( 6:45.72),  9.( 2:32.70), 10.( 5:04.13),
 11.( 6:31.35)

Table of Contents: starting sectors
  1.(       0),  2.(   17825),  3.(   34437),  4.(   53337),  5.(   77900),
  6.(  101487),  7.(  121312),  8.(  138650),  9.(  169097), 10.(  180567),
 11.(  203380), lead-out(  232740)
CDINDEX discid: gjDqDGoWWTrl2VhD_NtdXsqbOII-
CDDB discid: 0x830c1f0b CDDBP titles: resolved
CD-Text: not detected
CD-Extra: not detected
Album title: 'To Love Somebody' [from Janis Joplin (w/The Kozmic Blues Band)]
Track  1: 'Try (Just A Little Bit Harder)'
Track  2: 'Maybe'
Track  3: 'One Good Man'
Track  4: 'As Good As You've Been To This World'
Track  5: 'To Love Somebody'
Track  6: 'Kozmic Blues'
Track  7: 'Little Girl Blue'
Track  8: 'Work Me, Lord'
Track  9: 'Dear Landlord (session outtake)'
Track 10: 'Summertime (live at Woodstock)'
Track 11: 'Piece Of My Heart (live at Woodstock)'
No media catalog number present.
T:  1 ISRC: US-SM1-69-00397
T:  2 ISRC: US-SM1-69-00947
T:  3 ISRC: US-SM1-69-00948
T:  4 ISRC: US-SM1-69-00949
T:  5 ISRC: US-SM1-69-00950
T:  6 ISRC: US-SM1-69-00951
T:  7 ISRC: US-SM1-69-00952
T:  8 ISRC: US-SM1-69-00953
T:  9 ISRC: US-SM1-69-00168
T: 10 ISRC: US-SM1-69-01084
T: 11 ISRC: US-SM1-69-01085

index scan: 1...Segmentation fault: 11 (core dumped)

The bug was fixed in cdrtools-devel with version 2.01.01a04
but it's unlikely that it will be fixed in the stable cdrtools
branch untill the end of the next release cycle which hasn't yet begun.

Fix: 

http://www.fabiankeil.de/sourcecode/patch-cdda2wav%3A%3Atoc.c

fk@TP51 ~/test/cdda2wav $/usr/ports/sysutils/cdrtools/work/cdrtools-2.01/cdda2wav/OBJ/i386-freebsd-cc/cdda2wav dev=1,0,0 -cddb 1 -J
Type: ROM, Vendor 'HL-DT-ST' Model 'RW/DVD GCC-4241N' Revision '1.04' MMC+CDDA
307200 bytes buffer memory requested, 4 buffers, 27 sectors
#Cdda2wav version 2.01_freebsd_6.1_i386_i386, real time sched., soundcard, libparanoia support
AUDIOtrack pre-emphasis  copy-permitted tracktype channels
      1-11           no              no     audio    2
Table of Contents: total tracks:11, (total time 51:43.15)
  1.( 3:57.50),  2.( 3:41.37),  3.( 4:12.00),  4.( 5:27.38),  5.( 5:14.37),
  6.( 4:24.25),  7.( 3:51.13),  8.( 6:45.72),  9.( 2:32.70), 10.( 5:04.13),
 11.( 6:31.35)

Table of Contents: starting sectors
  1.(       0),  2.(   17825),  3.(   34437),  4.(   53337),  5.(   77900),
  6.(  101487),  7.(  121312),  8.(  138650),  9.(  169097), 10.(  180567),
 11.(  203380), lead-out(  232740)
CDINDEX discid: gjDqDGoWWTrl2VhD_NtdXsqbOII-
CDDB discid: 0x830c1f0b CDDBP titles: resolved
CD-Text: not detected
CD-Extra: not detected
Album title: 'I Got Dem Ol' Kozmic Blues Again Mama!'   [from Janis Joplin (w/The Kozmic Blues Band)]
Track  1: 'Try (Just A Little Bit Harder)'
Track  2: 'Maybe'
Track  3: 'One Good Man'
Track  4: 'As Good As You've Been To This World'
Track  5: 'To Love Somebody'
Track  6: 'Kozmic Blues'
Track  7: 'Little Girl Blue'
Track  8: 'Work Me, Lord'
Track  9: 'Dear Landlord (session outtake)'
Track 10: 'Summertime (live at Woodstock)'
Track 11: 'Piece Of My Heart (live at Woodstock)'
No media catalog number present.
T:  1 ISRC: US-SM1-69-00397
T:  2 ISRC: US-SM1-69-00947
T:  3 ISRC: US-SM1-69-00948
T:  4 ISRC: US-SM1-69-00949
T:  5 ISRC: US-SM1-69-00950
T:  6 ISRC: US-SM1-69-00951
T:  7 ISRC: US-SM1-69-00952
T:  8 ISRC: US-SM1-69-00953
T:  9 ISRC: US-SM1-69-00168
T: 10 ISRC: US-SM1-69-01084
T: 11 ISRC: US-SM1-69-01085

index scan: 11...
fk@TP51 ~/test/cdda2wav $
How-To-Repeat: Use the cddb option to rip
Janis Joplin's "I Got Dem Ol' Kozmic Blues Again Mama!".
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2006-03-18 15:19:56 UTC
State Changed
From-To: open->closed

Committed, thanks!