Reimar Döffinger <[email protected]> added the comment: On Wed, Mar 11, 2009 at 03:30:59PM +0000, Reimar Döffinger wrote: > > Michael, Could you elaborate a little on the 'wrongs' in the sugested fix? > > Because "buffer_start + length == buffer_end", thus the <= seems > correct, and the < should be wrong. I think it would discard the last > part of each packet unless there is some extra junk/padding at the end.
Oh, and in addition the checks are wrong since they do not take into account overflow for pointer arithmetic. p + 6 <= p_end must be p_end - p >= 6 and p + len + 6 <= p_end must be p_end - p >= len + 6 also if (a) ... else break can be simplified to if (!a) break; ... ____________________________________________________ FFmpeg issue tracker <[email protected]> <https://roundup.ffmpeg.org/roundup/ffmpeg/issue536> ____________________________________________________
