We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d3364b commit 46df766Copy full SHA for 46df766
vobsub/src/sub.rs
@@ -303,6 +303,9 @@ fn subtitle(raw_data: &[u8], base_time: f64) -> Result<Subtitle> {
303
// explicit offsets into `packet` in several places.
304
305
// Figure out where our control data starts.
306
+ if raw_data.len() < 2 {
307
+ return Err("unexpected end of subtitle data".into());
308
+ }
309
let (_, initial_control_offset) = parse_be_u16_as_usize(&raw_data[2..])?;
310
311
// Declare data we want to collect from our control packets.
0 commit comments