Re: Segmentation fauls because libmad doesn't check for buffer overflows

[email protected] Thu, 19 Oct 2006 10:35:34 +1000
Newsgroups gmane.comp.audio.mad.devel
Message-ID <[email protected]>
>
>If you have one, please send me a test case that causes a segfault.
>

I have patched libmad so that it checks for buffer overflow.

I cannot produce the segfault any more.
And I have also deleted the file (it was an 11GB video file and
the segfault was at about the 10GB mark).

You really should take a more pro-active approach to testing.
One way is to read your own code and make changes that guarantee
that buffer overflows cannot possibly happen.  You shouldn't
wait for users to report segmentation errors and fix them on a
case-by-case basis.

The other way is to generate randcom bad frames and see how your code
behaves.  What is so difficult about that?