[PATCH] Fix invalid memory access when no theoracomments are found
I'm attaching a patch that fixes invalid memory accesses when a stream contains no theoracomments. A sample where the problem can be seen is richard_stallman-speech-for-arcis-spanish-23_05_2005-1.ogg from FSF ( http://audio-video.gnu.org/video/ ).
Without this patch, on glibc 2.6, libtheora usage causes bad crashes on xine-lib because of failed assertions during malloc().
As far as I can see on trunk/1.1 there is a similar issue, although the code is completely different, as the case for no comments at all is not handled differently, so at least one comment is being loaded.