bugCompact Disc Input and Control Library - Bugs: bug #34826, Bug in .toc file parsing causes...

 
 

bug #34826: Bug in .toc file parsing causes cdio_open_cdrdao() to fail when .toc file contains a PRE_EMPHASIS statement

Submitted by:  None
Submitted on:  Tue 15 Nov 2011 06:29:20 AM UTC  
 
Category: run-time errorSeverity: 5 - Average
Item Group: libcdioStatus: None
Privacy: PublicAssigned to: Rocky Bernstein <rocky>
Originator Email: -unavailable-Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Thu 17 Nov 2011 01:40:26 AM UTC, comment #6:

You fix has been applied and the cdrdao driver test has been updated distinguish this kind of bug.

If you happen to submit more patches (and I hope you do), please consider how one can test the changes.

Thanks.

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Thu 17 Nov 2011 12:57:24 AM UTC, comment #5:

It is funny that in looking at the code I too was thinking about how to implement "silence".

Basically all that is needed is to expand the image by some number of 0's. Conceptually it isn't that hard.

But that said, doing it is always a little harder than talking about it.

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Thu 17 Nov 2011 12:44:48 AM UTC, comment #4:

Ah, I see. Sorry for the misunderstanding. It's not that urgent anyway. Before I can make use of the .toc file functionality in libcdio SILENCE would have to be implemented. So I'll have a look at that for now.

Anonymous
Wed 16 Nov 2011 07:39:58 PM UTC, comment #3:

My concern was to make sure we have a test case that covers this situation. The current test case in test/driver/cdrdao currently succeeds with the TOC I pasted below, and it should not have been able to do so.

However, I now see how I change the code, test and to make that same TOC give results similar to what you report. And that way I we test the patch and make sure we don't have a problem again.

Given this, I should be able to get to this in a reasonable amount of time.

By the way, the title of the bug is misleading because we only have problems for "NO PRE_EMPHASIS", not when there is "PRE_EMPHASIS".

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Wed 16 Nov 2011 06:15:11 PM UTC, comment #2:

Interesting. The example you posted fails for me with a "Error: open `test.toc'." message and passes when the NO PRE_EMPHASIS line is deleted (or with the patch enabled). This is stock dev-libs/libcdio-0.83:0 on gentoo x86_64. Same thing happened with libcdio-0.82.

Anonymous
Wed 16 Nov 2011 02:41:19 AM UTC, comment #1:

Although this seems clearly to be wrong, I'm having trouble getting this to fail.

The cdrao toc file I tired is:

// non default CTL flag of track 1

TRACK AUDIO
COPY
NO PRE_EMPHASIS
FOUR_CHANNEL_AUDIO
FILE "cdda.bin" 1:0:0

Could you post something simple along these lines that fails for you?

Thanks.

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Tue 15 Nov 2011 06:29:20 AM UTC, original submission:

Fix:

--- libcdio-0.83/lib/driver/image/cdrdao.c 2011-05-30 21:46:34.000000000 +0200
+++ libcdio-fixed/lib/driver/image/cdrdao.c 2011-11-15 07:15:55.051156820 +0100
@@ -612,7 +612,6 @@
} else if (0 == strcmp ("PRE_EMPHASIS", psz_field))
if (NULL != cd) {
cd->tocent[i].flags &= ~CDIO_TRACK_FLAG_PRE_EMPHASIS;
- goto err_exit;
}
} else {
goto format_error;

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rocky (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 05 Dec 2011 12:55:52 PM UTCrockyOpen/ClosedOpen=>Closed
    Wed 16 Nov 2011 02:41:19 AM UTCrockyAssigned toNone=>rocky

    Back to the top


    Powered by Savane 3.1-cleanup1