Browse Source

movdec: Avoid av_malloc(0) in stss

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
tags/n0.11
Alex Converse 14 years ago
parent
commit
29a20ac4a1
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/mov.c

+ 2
- 0
libavformat/mov.c View File

@@ -1529,6 +1529,8 @@ static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom)

av_dlog(c->fc, "keyframe_count = %d\n", entries);

if (!entries)
return 0;
if (entries >= UINT_MAX / sizeof(int))
return AVERROR_INVALIDDATA;
sc->keyframes = av_malloc(entries * sizeof(int));


Loading…
Cancel
Save