summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/ape.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/ape.c b/libavformat/ape.c
index 3a3b91283e..c3cc7b6445 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -323,6 +323,8 @@ static int ape_read_header(AVFormatContext * s)
ape->frames[i].pos -= ape->frames[i].skip;
ape->frames[i].size += ape->frames[i].skip;
}
+ if (ape->frames[i].size > INT_MAX - 3)
+ return AVERROR_INVALIDDATA;
ape->frames[i].size = (ape->frames[i].size + 3) & ~3;
}
if (ape->fileversion < 3810) {