#202 Conversion to MAUD file format results in corrupt files

closed-fixed
nobody
None
5
2012-03-20
2012-03-18
No

I have found a serious issue in the MAUD SoX file format writer. All the files generated by the conversion are corrupt because the FORM size is invalid. After investigating the source code, I have found the culprit in the following line of
maud.c:

#define MAUDHEADERSIZE (4+(4+4+32)+(4+4+32)+(4+4))

If you decompose this in the different chunks:
#define MAUDHEADERSIZE
(4+ // FORM HEADER
(4+4+32) // MHDR
(4+4+32) // ANNO -> PROBLEM IS HERE, SINCE THE SIZE IS 30 BYTES, NOT 32 AS WRITTEN IN THE HEADER (see line 311 of maud.c for correct size)
(4+4)) // MDAT

Can someone fix this? The code should be:
#define MAUDHEADERSIZE (4+(4+4+32)+(4+4+30)+(4+4))

Also, another issue, does the conversion take care of adding the padding byte if
the MDAT chunk size is not even?

Discussion

  • Ulrich Klauer

    Ulrich Klauer - 2012-03-20
    • status: open --> closed-fixed
     
  • Ulrich Klauer

    Ulrich Klauer - 2012-03-20

    You were right, MAUDHEADERSIZE was wrong, and there was no padding. I've committed a fix to the dot branch, which will become SoX 14.4.1 in a few weeks.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks