Files
FFmpeg/libavcodec
Aidan MacDonald a4405cc0cc avcodec/dvdsub_parser: Fix length check for short packets
The DVD subtitle parser handles two types of packets: "normal"
packets with a 16-bit length, and HD-DVD packets that set the
16-bit length to 0 and encode a 32-bit length in the next four
bytes. This implies that HD-DVD packets are at least six bytes
long, but the code didn't actually verify this.

The faulty length check results in an out of bounds read for
zero-length "normal" packets that occur in the input, which are
only 2 bytes long, but get misinterpreted as an HD-DVD packet.
When this happens the parser reads packet_len from beyond the
end of the input buffer. The subtitle stream is not correctly
decoded after this point due to the garbage packet_len.

Fixing this is pretty simple: fix the length check so packets
less than 6 bytes long will not be mistakenly parsed as HD-DVD
packets.

Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-11-16 08:41:14 +01:00
..
2022-11-06 14:39:36 +01:00
2022-11-06 14:39:36 +01:00
2022-11-06 17:37:21 +01:00
2022-11-06 14:39:35 +01:00
2022-11-06 14:39:35 +01:00
2022-11-06 14:39:35 +01:00
2022-09-27 13:19:52 +02:00
2022-11-06 14:39:35 +01:00
2022-11-06 14:39:35 +01:00
2022-11-06 14:39:27 +01:00
2022-11-06 14:39:27 +01:00
2022-11-06 14:39:27 +01:00
2022-11-06 14:39:27 +01:00
2022-11-06 14:39:27 +01:00
2022-11-06 14:39:27 +01:00
2022-11-06 14:39:27 +01:00
2022-11-06 14:39:27 +01:00
2022-10-24 00:46:56 +02:00
2022-11-06 14:39:39 +01:00
2022-11-06 14:39:40 +01:00
2022-11-06 14:39:40 +01:00
2022-11-06 14:39:40 +01:00
2022-11-06 14:39:34 +01:00
2022-10-17 09:56:47 +02:00
2022-10-05 08:26:19 +02:00
2022-10-05 08:26:19 +02:00
2022-10-22 17:28:01 +02:00
2022-10-18 13:20:37 +11:00
2022-10-18 13:20:37 +11:00
2022-11-06 14:39:36 +01:00
2022-11-06 14:39:36 +01:00
2022-11-06 14:39:36 +01:00
2022-11-06 14:39:37 +01:00
2022-11-06 14:39:37 +01:00
2022-11-06 14:39:36 +01:00
2022-11-06 14:39:36 +01:00
2022-11-06 14:39:37 +01:00
2022-11-06 14:39:36 +01:00
2022-10-20 06:57:30 +02:00
2022-10-24 00:46:58 +02:00
2022-11-10 16:28:07 +01:00
2022-09-29 00:05:32 +02:00
2022-09-29 00:05:32 +02:00
2022-09-30 19:11:36 +02:00
2022-11-06 14:39:38 +01:00
2022-10-08 10:19:30 +02:00
2022-10-27 13:17:07 +03:00
2022-11-06 14:39:42 +01:00
2022-10-02 20:27:36 +02:00
2022-11-06 14:39:35 +01:00
2022-11-12 11:23:04 +11:00
2022-10-14 16:14:24 +02:00
2022-11-06 14:39:36 +01:00
2022-09-30 04:40:44 +02:00
2022-10-17 09:51:47 +02:00
2022-11-12 13:40:45 -06:00
2022-11-06 14:39:33 +01:00
2022-11-06 14:39:41 +01:00
2022-10-26 20:30:25 +11:00
2022-10-13 23:42:25 +02:00
2022-10-18 13:20:37 +11:00
2022-11-06 14:39:39 +01:00
2022-11-06 14:39:39 +01:00
2022-11-06 14:39:39 +01:00
2022-11-06 14:39:39 +01:00