[FFmpeg-devel] [PATCH] DV demuxer: Stricter check for avio_read result.
Michael Niedermayer
michaelni at gmx.at
Wed Mar 7 04:49:47 CET 2012
On Tue, Mar 06, 2012 at 09:35:58PM +0100, Reimar Döffinger wrote:
> Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> ---
> libavformat/dv.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavformat/dv.c b/libavformat/dv.c
> index 1200dda..81a0e47 100644
> --- a/libavformat/dv.c
> +++ b/libavformat/dv.c
> @@ -495,7 +495,7 @@ static int dv_read_header(AVFormatContext *s)
> }
> AV_WB32(c->buf, state);
>
> - if (avio_read(s->pb, c->buf + 4, DV_PROFILE_BYTES - 4) <= 0 ||
> + if (avio_read(s->pb, c->buf + 4, DV_PROFILE_BYTES - 4) != DV_PROFILE_BYTES - 4 ||
> avio_seek(s->pb, -DV_PROFILE_BYTES, SEEK_CUR) < 0)
> return AVERROR(EIO);
ok unless roman has time / wants to review
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120307/82f2a460/attachment.asc>
More information about the ffmpeg-devel
mailing list