read beyond buffer

Martin Kuball <[email protected]> Wed, 1 Nov 2006 13:18:53 +0100
Newsgroups gmane.comp.video.xvid.user
Message-ID <[email protected]>
Hi!

I'm writing an application that uses libxvid 1.1.0 to decode mpeg4 videos.
I noticed that when calling

	frameStruct.bitstream = input_buffer;
	frameStruct.length = length;  //length of input_buffer
	xvid_decore(handle, XVID_DEC_DECODE, &frameStruct, &statusStruct);

xvid is sometimes accesing bytes beyond input_buffer[length-1]. This 
happens everytime a userdata frame is red and somethimes with vops, too.
I could not find any documentation saying that you need to provide extra 
space at the end of the buffer. And actually if you provide a length field 
in the API I consider it as a bug if it is not honoured.

So what is necessary to make it work reliably?

By the way I could not check with version 1.1.1 because I was not able to 
download it. Seems to be some broken links on the web page.

Martin