[MPlayer-users] Sign extension bug in stream_read_qword_le

Nico Sabbi nicola_sabbi at fastwebnet.it
Sun Aug 19 00:13:10 CEST 2007


Sean Veers wrote:
> Hello,
> 
> A bug in stream_read_qword_le causes the returned value to
> unconditionally have the 32 most significant bits set if msb of the
> 4th byte read is set. This is a result of sign extension as a negative
> signed int is promoted to a uint64_t: y|=stream_read_char(s)<<24;
> 
> A visible effect of this bug is errors in the generated keyframe
> tables for certain large AVI files, making the files unseekable.
> 
> A cast to an unsigned type (uint32_t or uint64_t) fixes the bug
> (compiled and verified to work):

repost to mplayer-dev-eng, please



More information about the MPlayer-users mailing list