avcodec/ituh263dec: Use 0xffff as error code in h263p_decode_umotion()
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 28 Feb 2017 21:07:37 +0000 (22:07 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 2 Mar 2017 02:16:12 +0000 (03:16 +0100)
This matches ff_h263_decode_motion() both functions error codes are interpreted by the same common code

Fixes: 690/clusterfuzz-testcase-4744944981901312

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/ituh263dec.c

index e393388..edb6886 100644 (file)
@@ -305,7 +305,7 @@ static int h263p_decode_umotion(MpegEncContext * s, int pred)
       code += get_bits1(&s->gb);
       if (code >= 32768) {
           avpriv_request_sample(s->avctx, "Huge DMV");
-          return AVERROR_INVALIDDATA;
+          return 0xffff;
       }
    }
    sign = code & 1;