[FFmpeg-devel] [PATCH] libavformat: data loss in message accumulation in fill_buffer()

Michael Niedermayer michael at niedermayer.cc
Tue May 16 23:25:41 EEST 2017


On Tue, May 16, 2017 at 09:05:49AM -0700, Rob Meyers wrote:
> We noticed when reading data from a named pipe the first 10 bytes
> would get dropped. I traced this to the affected code in
> fill_buffer(). The assignment of "dst" was always set to the beginning
> of the buffer, and if it hadn't been consumed yet the data would be
> overwritten. We could reproduce this by setting up a server that
> writes to the named pipe in two small (6 byte) messages with a 1
> second gap between. Without the gap, or if the data is sent as one
> message, there's no problem. It's in the accumulation of data between
> messages to fulfill a read that this bug is triggered.
> 
> ---
>  libavformat/aviobuf.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

as just explained in the previous thread, this is not the correct
change to fix the issue
(just saying so this isnt applied by mistake)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170516/5909ff7b/attachment.sig>


More information about the ffmpeg-devel mailing list