summaryrefslogtreecommitdiff
path: root/libavformat/ape.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-09-11 22:29:33 +0300
committerMartin Storsjö <martin@martin.st>2013-09-12 10:53:25 +0300
commit183b9d843a9533774fabd3984a52f3987001acbc (patch)
treeee39dd49b32501e0b268f950354099bd69749914 /libavformat/ape.c
parentb26742cc308552f242ee2bf93b07a3ff509f4edc (diff)
ape: Don't allow the seektable to be omitted
The seektable is required for filling in ape->frames[i].pos further down. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/ape.c')
-rw-r--r--libavformat/ape.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/ape.c b/libavformat/ape.c
index 4079947439..d967a5d660 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -260,7 +260,7 @@ static int ape_read_header(AVFormatContext * s)
ape->totalframes);
return -1;
}
- 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);