« Previous | Next » 

Revision 62d0a745

Parent cd37308b
Child 08ad81cb

Added by Martin Storsjö over 10 years ago

aviobuf: Write new data at s->buf_end in fill_buffer

In most cases, s->buf_ptr will be equal to s->buf_end when
fill_buffer is called, but this may not always be the case, if
we're seeking forward by reading (permitted by the short seek

If fill_buffer is writing to s->buf_ptr instead of s->buf_end (when
they aren't equal and s->buf_ptr is ahead of s->buffer), the data
between s->buf_ptr and s->buf_end is overwritten, leading to
inconsistent buffer content. This could return incorrect data if
later seeking back into the area before the current s->buf_ptr.

Signed-off-by: Luca Barbato <>
(cherry picked from commit e360ada2d13af36ab7afd9ebcd2bd236d23d9b96)


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences