1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-19 05:49:09 +02:00
FFmpeg/libavcodec
Andreas Rheinhardt cda3e8ca04 avcodec/cbs: Fix potential overflow
The number of bits in a PutBitContext must fit into an int, yet nothing
guaranteed the size argument cbs_write_unit_data() uses in init_put_bits()
to be in the range 0..INT_MAX / 8. This has been changed.

Furthermore, the check 8 * data_size > data_bit_start that there is
data beyond the initial padding when writing mpeg2 or H.264/5 slices
could also overflow, so divide it by 8 to get an equivalent check
without this problem.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-11-17 23:31:45 +00:00
..
2019-10-17 12:33:50 +02:00
2019-07-25 15:13:09 +01:00
2019-11-10 13:55:39 +00:00
2019-09-26 21:02:34 +02:00
2019-10-21 22:57:10 +02:00
2019-06-26 21:25:10 +02:00
2019-11-17 23:31:45 +00:00
2019-07-07 11:33:19 +02:00
2019-08-11 19:13:21 +02:00
2019-11-13 09:08:43 -08:00
2019-05-06 23:58:34 +02:00
2019-10-10 14:34:19 +02:00
2018-12-23 15:30:13 +01:00
2018-12-10 11:19:36 +01:00
2019-08-29 21:04:54 +02:00
2019-08-29 15:57:54 +02:00
2019-09-19 23:56:03 -07:00
2018-12-20 18:40:41 +08:00
2019-01-16 01:29:18 +01:00
2019-06-29 19:22:19 +02:00
2019-08-11 19:13:21 +02:00
2019-09-02 13:46:11 -07:00
2019-03-31 23:35:00 +02:00
2018-12-23 15:30:13 +01:00
2018-12-01 19:41:48 +01:00
2019-10-10 14:34:20 +02:00
2019-10-22 10:51:42 +08:00
2019-09-06 22:26:55 +02:00
2019-11-03 16:45:35 +08:00
2019-11-03 16:45:35 +08:00
2018-12-03 23:34:05 +01:00
2019-08-23 22:24:07 +02:00
2018-11-18 22:59:29 +01:00
2019-07-08 09:38:03 +02:00
2019-09-20 23:26:34 +02:00
2019-09-16 21:30:19 +02:00
2019-11-09 17:59:03 +01:00
2019-11-01 14:43:16 +01:00
2019-11-01 15:19:55 -07:00
2019-07-28 22:34:26 +01:00
2019-06-12 20:06:20 +10:00
2019-10-25 00:22:33 +02:00
2019-08-22 18:35:44 +02:00
2019-08-22 18:35:44 +02:00
2019-10-26 09:57:01 -07:00
2019-09-05 19:45:53 +02:00
2019-05-02 15:36:16 +02:00
2019-11-09 17:27:20 +01:00