The crafted overflow line at the open_project door
Browse files at this commit85c5140841969a067a4798e666d62cfb6629f069Parent: b355130- test
- the crafted overflow line at the open_project door
1 changed file +6 -0
crates/engine/tests/saveload.rsmodified+6 -0
| @@ -295,6 +295,12 @@ fn malformed_files_are_numbered_errors_and_never_panics() { | |||
| 295 | ("edith 1\nsource test_av.mp4\nclip 30 30 0\n", "line 3"), | 295 | ("edith 1\nsource test_av.mp4\nclip 30 30 0\n", "line 3"), |
| 296 | ("edith 1\nsource test_av.mp4\n\nclip 0 30 0\n", "line 3"), | 296 | ("edith 1\nsource test_av.mp4\n\nclip 0 30 0\n", "line 3"), |
| 297 | ("edith 1\nsource test_av.mp4\nwhat 1\n", "line 3"), | 297 | ("edith 1\nsource test_av.mp4\nwhat 1\n", "line 3"), |
| 298 | + // Crafted numbers: `start + len` used to wrap past the top of `u32`, | ||
| 299 | + // and a wrapped end walks straight through the overlap check. | ||
| 300 | + ( | ||
| 301 | + "edith 2\nsource test_av.mp4\nvideo 4294967290 0 30 0 -\n", | ||
| 302 | + "line 3", | ||
| 303 | + ), | ||
| 298 | ] { | 304 | ] { |
| 299 | std::fs::write(&path, text).expect("write"); | 305 | std::fs::write(&path, text).expect("write"); |
| 300 | let err = PlaybackSession::open_project(&path) | 306 | let err = PlaybackSession::open_project(&path) |