Andreas Rheinhardt
82d70d8038
avcodec/hevc_mp4toannexb_bsf: Check NAL size against available input
...
The hevc_mp4toannexb bsf does not explicitly check whether a NAL unit
is so big that it extends beyond the end of the input packet; it does so
only implicitly by using the checked version of the bytestream2 API.
But this has downsides compared to real checks: It can lead to huge
allocations (up to 2GiB) even when the input packet is just a few bytes.
And furthermore it leads to uninitialized data being output.
So add a check to error out early if it happens.
Also check directly whether there is enough data for the length field.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
(cherry picked from commit ea1b71e82f )
2020-06-15 04:18:16 +02:00
..
2020-05-22 14:38:57 +02:00
2020-05-22 22:16:53 +02:00
2020-06-08 00:21:15 +02:00
2020-05-29 19:40:36 +02:00
2020-05-29 19:40:36 +02:00
2020-06-07 22:01:12 +02:00
2020-05-27 22:13:39 +02:00
2020-06-08 20:45:56 +02:00
2020-05-31 13:13:52 +02:00
2020-05-26 10:23:06 +01:00
2020-05-23 00:26:38 +02:00
2020-05-22 14:38:57 +02:00
2020-05-21 12:32:15 -03:00
2020-05-22 14:38:57 +02:00
2020-05-22 14:38:57 +02:00
2020-05-22 14:38:57 +02:00
2020-05-31 18:31:54 +02:00
2020-06-02 19:02:12 -03:00
2020-05-21 12:32:15 -03:00
2020-06-04 19:22:29 +02:00
2020-05-22 14:38:57 +02:00
2020-06-06 00:25:00 +02:00
2020-05-22 14:38:57 +02:00
2020-05-22 14:38:57 +02:00
2020-05-22 11:16:40 -03:00
2020-06-14 16:45:05 -03:00
2020-05-22 21:01:29 +03:00
2020-06-14 16:44:57 -03:00
2020-05-21 09:31:08 +02:00
2020-06-14 22:02:34 +02:00
2020-05-22 14:38:57 +02:00
2020-05-30 18:02:55 +02:00
2020-05-30 18:02:55 +02:00
2020-05-22 14:38:57 +02:00
2020-05-27 10:22:17 +02:00
2020-05-22 14:38:57 +02:00
2020-06-04 09:58:27 -03:00
2020-05-21 12:32:15 -03:00
2020-06-02 19:02:12 -03:00
2020-05-21 09:31:08 +02:00
2020-05-22 14:38:57 +02:00
2020-05-21 12:32:15 -03:00
2020-05-22 14:38:57 +02:00
2020-06-01 14:52:26 +02:00
2020-05-22 14:38:57 +02:00
2020-06-14 22:02:34 +02:00
2020-05-22 14:38:57 +02:00
2020-05-21 12:32:15 -03:00
2020-05-27 21:59:51 +08:00
2020-05-25 12:46:22 -03:00
2020-05-27 21:59:51 +08:00
2020-05-22 14:38:57 +02:00
2020-05-22 14:38:57 +02:00
2020-05-25 11:59:42 +02:00
2020-05-22 14:38:57 +02:00
2020-05-25 11:59:42 +02:00
2020-06-02 00:02:04 +02:00
2020-05-25 11:59:42 +02:00
2020-05-22 14:38:57 +02:00
2020-05-22 14:38:57 +02:00
2020-06-08 20:45:56 +02:00
2020-06-15 04:18:16 +02:00
2020-06-08 10:51:56 +02:00
2020-06-08 10:51:56 +02:00
2020-06-08 10:51:56 +02:00
2020-05-27 14:39:36 +08:00
2020-06-08 10:51:56 +02:00
2020-06-05 18:14:17 +02:00
2020-06-06 00:38:53 +02:00
2020-05-21 12:32:15 -03:00
2020-06-14 22:02:34 +02:00
2020-05-22 14:38:57 +02:00
2020-06-02 19:02:12 -03:00
2020-05-21 09:31:08 +02:00
2020-06-07 01:23:40 +02:00
2020-06-14 22:02:34 +02:00
2020-05-21 12:32:15 -03:00
2020-05-21 12:32:15 -03:00
2020-06-06 01:04:39 -03:00
2020-05-22 22:16:53 +02:00
2020-05-23 20:25:08 +02:00
2020-05-21 12:32:15 -03:00
2020-05-23 20:24:37 +02:00
2020-05-21 12:32:15 -03:00
2020-06-02 19:02:12 -03:00
2020-05-22 14:38:57 +02:00
2020-06-02 19:02:12 -03:00
2020-06-02 19:02:12 -03:00
2020-06-02 19:02:12 -03:00
2020-06-02 19:02:12 -03:00
2020-06-14 21:10:41 +02:00
2020-05-21 12:32:15 -03:00
2020-06-14 22:02:34 +02:00
2020-06-14 22:02:34 +02:00
2020-06-08 00:21:15 +02:00
2020-05-21 12:32:15 -03:00
2020-06-07 01:23:40 +02:00
2020-05-25 18:07:45 +02:00
2020-05-27 00:19:32 +03:00
2020-05-27 00:19:32 +03:00
2020-05-22 14:38:57 +02:00
2020-05-22 14:38:57 +02:00
2020-05-27 21:59:51 +08:00
2020-06-06 00:25:00 +02:00
2020-05-22 14:38:57 +02:00
2020-06-14 22:02:34 +02:00
2020-05-22 14:38:57 +02:00
2020-05-22 14:38:57 +02:00
2020-05-22 14:38:57 +02:00
2020-06-14 22:02:34 +02:00
2020-05-27 21:59:51 +08:00
2020-06-14 22:02:34 +02:00
2020-06-01 07:05:32 +08:00
2020-05-26 10:23:11 +01:00
2020-06-02 19:02:12 -03:00
2020-06-14 22:02:34 +02:00
2020-05-22 14:38:57 +02:00
2020-05-22 14:38:57 +02:00
2020-06-04 15:33:19 +02:00
2020-05-22 22:23:18 +02:00
2020-05-22 14:38:57 +02:00
2020-05-26 10:52:12 +01:00
2020-05-26 10:52:12 +01:00
2020-05-26 10:52:12 +01:00
2020-06-02 19:02:12 -03:00
2020-06-07 01:23:40 +02:00
2020-05-22 14:38:57 +02:00
2020-06-14 22:02:34 +02:00
2020-06-06 00:25:00 +02:00
2020-05-26 10:23:13 +01:00
2020-05-22 14:38:57 +02:00
2020-06-08 20:45:56 +02:00
2020-05-30 18:02:55 +02:00
2020-05-30 18:02:55 +02:00
2020-06-01 07:05:32 +08:00
2020-05-22 14:38:57 +02:00
2020-05-21 12:32:15 -03:00
2020-05-21 12:32:15 -03:00
2020-06-11 10:08:58 -03:00
2020-06-02 19:02:12 -03:00
2020-05-21 12:32:15 -03:00
2020-06-03 06:57:50 +08:00
2020-05-22 14:38:57 +02:00
2020-05-27 21:59:51 +08:00
2020-05-27 21:59:51 +08:00
2020-05-22 22:23:18 +02:00
2020-06-14 22:02:34 +02:00
2020-06-09 18:21:59 -03:00
2020-06-14 22:02:34 +02:00
2020-06-02 19:02:12 -03:00
2020-05-22 14:38:57 +02:00
2020-05-21 13:08:23 +02:00
2020-05-21 12:32:15 -03:00
2020-05-22 14:38:57 +02:00
2020-05-22 14:38:57 +02:00
2020-05-21 12:32:15 -03:00
2020-05-27 22:13:39 +02:00
2020-05-21 12:32:15 -03:00
2020-06-08 01:22:34 +02:00
2020-05-21 12:32:15 -03:00
2020-05-21 12:32:15 -03:00
2020-05-21 12:32:15 -03:00
2020-05-27 15:34:16 +08:00
2020-06-08 22:49:04 +02:00
2020-05-22 14:38:57 +02:00
2020-05-22 14:38:57 +02:00
2020-05-22 14:38:57 +02:00
2020-05-22 14:38:57 +02:00
2020-06-04 23:58:49 +02:00
2020-06-04 23:09:07 +02:00
2020-06-14 22:02:34 +02:00
2020-05-27 21:59:51 +08:00
2020-05-21 12:32:15 -03:00
2020-05-23 07:07:36 +02:00
2020-05-21 09:31:08 +02:00
2020-05-21 12:32:15 -03:00
2020-05-21 12:32:15 -03:00