aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-02-24 21:05:33 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-14 12:20:15 +0200
commit1e301c21d7478764ea46e0505e28675d1cf5e047 (patch)
tree9c3dcd6ed0ebed34b6b059262b179cd91d47de02 /libavcodec
parent24a9a51e579a0bdf9f55fd594b71493a8d33039b (diff)
downloadffmpeg-1e301c21d7478764ea46e0505e28675d1cf5e047.tar.gz
avcodec/vp56: Fix sign typo
Fixes: 664/clusterfuzz-testcase-4917047475568640 The change to fate is due to a truncated last frames which is now detected as damaged. Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 513a3494396d0a20233273b3cadcb5ee86485d5c) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vp5.c2
-rw-r--r--libavcodec/vp6.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vp5.c b/libavcodec/vp5.c
index aba177c89f..54db620bde 100644
--- a/libavcodec/vp5.c
+++ b/libavcodec/vp5.c
@@ -180,7 +180,7 @@ static int vp5_parse_coeff(VP56Context *s)
int b, i, cg, idx, ctx, ctx_last;
int pt = 0; /* plane type (0 for Y, 1 for U or V) */
- if (c->end >= c->buffer && c->bits >= 0) {
+ if (c->end <= c->buffer && c->bits >= 0) {
av_log(s->avctx, AV_LOG_ERROR, "End of AC stream reached in vp5_parse_coeff\n");
return AVERROR_INVALIDDATA;
}
diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index 7f0a9b7d5d..662126ca70 100644
--- a/libavcodec/vp6.c
+++ b/libavcodec/vp6.c
@@ -450,7 +450,7 @@ static int vp6_parse_coeff(VP56Context *s)
int b, i, cg, idx, ctx;
int pt = 0; /* plane type (0 for Y, 1 for U or V) */
- if (c->end >= c->buffer && c->bits >= 0) {
+ if (c->end <= c->buffer && c->bits >= 0) {
av_log(s->avctx, AV_LOG_ERROR, "End of AC stream reached in vp6_parse_coeff\n");
return AVERROR_INVALIDDATA;
}