Files
FFmpeg/libavcodec
Andreas Cadhalpun 27d50fb2d5 vp8: change mv_{min,max}.{x,y} type to int
If one of the dimensions is larger than 8176, s->mb_width or
s->mb_height is larger than 511, leading to an int16_t overflow of
s->mv_max.{x,y}. This then causes av_clip to be called with amin > amax.

Changing the type to int avoids the overflow and has no negative
effect, because s->mv_max is only used in clamp_mv for clipping.
Since mv_max.{x,y} is positive and mv_min.{x,y} negative, av_clip can't
increase the absolute value. The input to av_clip is an int16_t, and
thus the output fits into int16_t as well.

For additional safety, s->mv_{min,max}.{x,y} are clipped to int16_t range
before use.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 6fdbaa2b7f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-28 02:33:56 +02:00
..
2014-06-02 20:18:44 +02:00
2014-11-13 19:01:08 +01:00
2015-03-21 01:52:52 +01:00
2014-06-15 12:11:46 +02:00
2014-06-15 12:11:46 +02:00
2014-08-24 11:05:42 +00:00
2014-08-24 11:05:42 +00:00
2015-07-28 02:33:56 +02:00
2014-08-24 11:05:42 +00:00
2014-11-30 12:56:02 +01:00
2014-11-21 17:13:56 +01:00
2015-07-28 02:33:56 +02:00
2014-09-23 17:04:02 +02:00
2014-04-22 20:44:31 +02:00
2014-12-01 00:31:06 +01:00
2014-11-14 20:25:02 +01:00
2014-09-06 20:59:20 +02:00
2014-09-06 20:59:20 +02:00
2014-04-22 02:38:03 +02:00
2014-11-21 17:13:56 +01:00
2014-08-24 11:05:42 +00:00
2015-05-21 20:43:39 +02:00
2014-06-03 10:58:19 -08:00
2014-10-24 09:53:42 +03:00
2014-04-22 20:44:31 +02:00
2014-08-24 11:05:42 +00:00
2014-10-15 16:08:36 +02:00
2014-11-13 01:41:26 +01:00
2014-04-22 20:08:30 +02:00
2014-10-28 12:22:03 +01:00
2014-10-28 12:22:03 +01:00
2014-10-28 12:48:58 +01:00
2014-10-28 15:30:05 +01:00
2014-04-01 00:10:15 +02:00
2015-03-21 01:52:53 +01:00
2015-03-21 01:52:52 +01:00
2014-04-12 05:40:37 +02:00
2014-04-05 03:32:11 +02:00
2015-06-19 11:10:13 +02:00
2014-10-24 09:53:42 +03:00
2014-04-12 15:41:00 +02:00
2014-11-26 04:11:16 +01:00
2014-08-24 11:05:42 +00:00
2014-11-03 10:15:07 -05:00
2014-04-04 04:00:11 +02:00
2015-03-21 23:59:50 +01:00
2014-08-25 23:12:30 +02:00
2014-08-24 11:05:42 +00:00
2014-08-24 11:05:42 +00:00
2014-12-22 03:17:56 +01:00
2014-05-31 13:41:10 +02:00
2014-06-05 20:31:59 +02:00
2014-11-25 02:00:06 +00:00
2014-08-05 01:54:47 +02:00
2015-03-21 01:52:52 +01:00
2014-12-22 03:17:56 +01:00
2014-08-24 11:05:42 +00:00
2014-05-25 05:19:09 +02:00
2014-08-24 11:05:42 +00:00
2014-08-19 13:35:44 +00:00
2014-12-03 11:56:22 +01:00
2014-11-21 12:37:50 +00:00
2015-02-12 17:10:35 +01:00
2014-08-24 11:05:42 +00:00
2014-08-24 11:05:42 +00:00
2014-08-24 11:05:42 +00:00
2014-08-24 11:05:42 +00:00
2014-11-16 23:48:38 +01:00
2014-08-24 11:05:42 +00:00
2014-08-24 11:05:42 +00:00
2014-04-22 20:44:31 +02:00
2014-10-27 20:55:57 +01:00
2014-08-31 10:25:36 +02:00
2014-08-29 18:57:25 +02:00
2014-10-03 22:51:29 +02:00
2014-11-25 02:00:27 +01:00
2014-11-16 23:48:38 +01:00
2014-10-18 19:41:48 +02:00
2015-03-21 01:52:51 +01:00
2014-11-16 23:48:38 +01:00
2014-08-24 11:05:42 +00:00
2014-09-30 20:21:14 +02:00
2014-08-24 11:05:42 +00:00
2014-08-24 11:05:42 +00:00
2014-08-24 11:05:42 +00:00
2014-08-24 11:05:42 +00:00
2014-10-04 00:21:17 +02:00
2014-10-22 23:12:38 +02:00
2014-07-12 22:33:27 +02:00
2014-06-07 17:44:23 +02:00
2014-06-07 17:44:14 +02:00
2014-10-15 16:08:36 +02:00
2014-05-12 03:27:04 +02:00
2014-12-01 00:31:06 +01:00
2014-11-21 17:13:56 +01:00
2014-08-24 11:05:42 +00:00
2014-08-24 11:05:42 +00:00
2014-06-18 03:13:37 +02:00
2014-06-18 03:13:37 +02:00
2014-03-29 18:13:15 +01:00
2015-05-21 20:43:38 +02:00
2014-10-18 20:06:29 +02:00
2014-08-24 11:05:42 +00:00