Commit 513a3494 authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 5d81616b
...@@ -180,7 +180,7 @@ static int vp5_parse_coeff(VP56Context *s) ...@@ -180,7 +180,7 @@ static int vp5_parse_coeff(VP56Context *s)
int b, i, cg, idx, ctx, ctx_last; int b, i, cg, idx, ctx, ctx_last;
int pt = 0; /* plane type (0 for Y, 1 for U or V) */ 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"); av_log(s->avctx, AV_LOG_ERROR, "End of AC stream reached in vp5_parse_coeff\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
......
...@@ -450,7 +450,7 @@ static int vp6_parse_coeff(VP56Context *s) ...@@ -450,7 +450,7 @@ static int vp6_parse_coeff(VP56Context *s)
int b, i, cg, idx, ctx; int b, i, cg, idx, ctx;
int pt = 0; /* plane type (0 for Y, 1 for U or V) */ 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"); av_log(s->avctx, AV_LOG_ERROR, "End of AC stream reached in vp6_parse_coeff\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
......
...@@ -249,4 +249,4 @@ ...@@ -249,4 +249,4 @@
0, 243, 243, 1, 233472, 0x6f530ac6 0, 243, 243, 1, 233472, 0x6f530ac6
0, 244, 244, 1, 233472, 0x94f7466c 0, 244, 244, 1, 233472, 0x94f7466c
0, 245, 245, 1, 233472, 0xa8c1d365 0, 245, 245, 1, 233472, 0xa8c1d365
0, 246, 246, 1, 233472, 0xedcff050 0, 246, 246, 1, 233472, 0x8843293b
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment