]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit '183b9d843a9533774fabd3984a52f3987001acbc'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 12 Sep 2013 11:45:03 +0000 (13:45 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 12 Sep 2013 11:51:20 +0000 (13:51 +0200)
* commit '183b9d843a9533774fabd3984a52f3987001acbc':
  ape: Don't allow the seektable to be omitted

See: e7cb161515fc9fb6d30d1681d64d9ba7ad737a4e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/ape.c

index 6a78ea9908790afa487cf52fd1b2c297ab31f5cd,d967a5d660e0a8a724822969bfb66edc40dfa9f5..7ed9dd813b78ea0bd9c8236b0bcc58a1b8262b83
@@@ -256,9 -258,9 +256,9 @@@ static int ape_read_header(AVFormatCont
      if(ape->totalframes > UINT_MAX / sizeof(APEFrame)){
          av_log(s, AV_LOG_ERROR, "Too many frames: %"PRIu32"\n",
                 ape->totalframes);
 -        return -1;
 +        return AVERROR_INVALIDDATA;
      }
-     if (ape->seektablelength && (ape->seektablelength / sizeof(*ape->seektable)) < ape->totalframes) {
+     if (ape->seektablelength / sizeof(*ape->seektable) < ape->totalframes) {
          av_log(s, AV_LOG_ERROR,
                 "Number of seek entries is less than number of frames: %zu vs. %"PRIu32"\n",
                 ape->seektablelength / sizeof(*ape->seektable), ape->totalframes);