ffmpeg/libavcodec
Andreas Cadhalpun d52b5f85f2 mjpegdec: consider chroma subsampling in size check
If the chroma components are subsampled, smaller buffers are allocated
for them. In that case the maximal block_offset for the chroma
components is not as large as for the luma component.

This fixes out of bounds writes causing segmentation faults or memory
corruption.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 5adb5d9d894aa495e7bf9557b4c78350cbfc9d32)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-07 01:34:15 +01: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
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-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
2015-11-26 16:58:31 +01: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-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
2015-03-21 01:52:53 +01:00
2015-03-21 01:52:52 +01:00
2014-04-12 05:40:37 +02:00
2015-06-19 11:10:13 +02:00
2014-10-24 09:53:42 +03: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
2015-07-30 18:53:29 +02: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
2015-07-30 18:53:15 +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
2015-11-26 01:37:55 +01: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
2015-11-26 16:58:32 +01: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
2015-11-26 16:58:31 +01: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
2015-05-21 20:43:38 +02:00
2014-10-18 20:06:29 +02:00
2014-08-24 11:05:42 +00:00