avio: exit early in fill_buffer without read_packet
authorJanne Grunau <janne-libav@jannau.net>
Tue, 3 Jan 2012 17:11:36 +0000 (18:11 +0100)
committerJanne Grunau <janne-libav@jannau.net>
Wed, 4 Jan 2012 10:18:24 +0000 (11:18 +0100)
commita2d1d216291fd8c1f4a8b3bad4f0b50c084ba96d
tree4c14cc8bfe2ebfa3a6abe64315cddaa1836108b9
parentd209c27b09234cc40bbdbd680aa502b493edf595
avio: exit early in fill_buffer without read_packet

Fixes an invalid free() with ass in avi. The sample in bug 98 passes
parts of AVPacket.data as buffer for the AVIOContext. Since the packet
is quite large fill_buffer tries to reallocate the buffer before doing
nothing. Fixes bug 98.
libavformat/aviobuf.c