aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorDale Curtis <dalecurtis@chromium.org>2012-04-12 18:02:33 -0700
committerMichael Niedermayer <michaelni@gmx.at>2012-04-13 11:28:32 +0200
commitfd165a0b3166bd4605f4f65197b0d43c9382f3e7 (patch)
tree3ad64798b3171edf6323387b5b6f2534e7f01412 /libavformat
parenta9d114dc8a24ae439fa6a2fe5eb1bfc346a0ad4a (diff)
downloadffmpeg-fd165a0b3166bd4605f4f65197b0d43c9382f3e7.tar.gz
mov: Fix harmless OOB read.
Convert key_off initialize to use the same sc->keyframe_count as used elsewhere in the function. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mov.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index b4ff1df2eb..ce61250eac 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1842,7 +1842,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
unsigned int stts_sample = 0;
unsigned int sample_size;
unsigned int distance = 0;
- int key_off = sc->keyframes && sc->keyframes[0] == 1;
+ int key_off = sc->keyframe_count && sc->keyframes[0] == 1;
current_dts -= sc->dts_shift;