aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-04 19:07:21 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-04 19:07:21 +0100
commit7c72398787316c82cc13d21fe318ec2fb8b991da (patch)
treee7ea9cacf5199129c08f09d84bd3263dbde0e52e /libavformat/mov.c
parent048e28420172ac5c1ae45f492172197dccbc8d00 (diff)
parent86d0bf0e96bf917e283d24239ce0eed08351da86 (diff)
downloadffmpeg-7c72398787316c82cc13d21fe318ec2fb8b991da.tar.gz
Merge commit '86d0bf0e96bf917e283d24239ce0eed08351da86' into release/0.10
* commit '86d0bf0e96bf917e283d24239ce0eed08351da86': mov: Seek back if overreading an individual atom vcr1: add sanity checks pictordec: pass correct context to avpriv_request_sample dsicinav: Clip the source size to the expected maximum alsdec: Clean up error paths ogg: Fix potential infinite discard loop nuv: check rtjpeg_decode_frame_yuv420 return value Conflicts: libavcodec/pictordec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 7ac838cf09..efa73b7c6d 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -360,6 +360,12 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom)
left = a.size - avio_tell(pb) + start_pos;
if (left > 0) /* skip garbage at atom end */
avio_skip(pb, left);
+ else if (left < 0) {
+ av_log(c->fc, AV_LOG_WARNING,
+ "overread end of atom '%.4s' by %"PRId64" bytes\n",
+ (char*)&a.type, -left);
+ avio_seek(pb, left, SEEK_CUR);
+ }
}
total_size += a.size;