Ticket #578: patch0sttsentries.diff

File patch0sttsentries.diff, 582 bytes (added by Carl Eugen Hoyos, 15 years ago)
  • libavformat/mov.c

    diff --git a/libavformat/mov.c b/libavformat/mov.c
    index 198f3cd..8170004 100644
    a b static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom)  
    15631563    av_dlog(c->fc, "track[%i].stts.entries = %i\n",
    15641564            c->fc->nb_streams-1, entries);
    15651565
    1566     if (!entries || entries >= UINT_MAX / sizeof(*sc->stts_data))
     1566    if (!entries)
     1567        return 0;
     1568    if (entries >= UINT_MAX / sizeof(*sc->stts_data))
    15671569        return AVERROR(EINVAL);
    15681570
    15691571    sc->stts_data = av_malloc(entries * sizeof(*sc->stts_data));