edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
| 1 | |
| 2 | |
| 3 | // Untrusted entry: a raw AV1 OBU stream through the full decoder |
| 4 | // (ec_av1::stream::decode_stream_with_threads). Errors are expected for malformed |
| 5 | // input; only panics, hangs and OOM count. |
| 6 | // |
| 7 | // Caps, so one iteration stays in the milliseconds and the fuzzer cannot OOM: |
| 8 | // - a sequence header larger than MAX_WIDTH x MAX_HEIGHT is not decoded at all; |
| 9 | // - at most MAX_FRAMES frame OBUs are decoded: the stream is cut before the next one; |
| 10 | // - the decoder runs on one thread. |
| 11 | |
| 12 | use decode_stream_with_threads; |
| 13 | use ; |
| 14 | use fuzz_target; |
| 15 | |
| 16 | /// Largest frame decoded. |
| 17 | const MAX_WIDTH: u32 = 64; |
| 18 | const MAX_HEIGHT: u32 = 64; |
| 19 | /// Frame OBUs decoded per input. |
| 20 | const MAX_FRAMES: usize = 8; |
| 21 | |
| 22 | /// Pre-scan the OBUs: `None` when a sequence header is over the size limit, otherwise the |
| 23 | /// byte length of the prefix that holds at most MAX_FRAMES frames. |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | fuzz_target! |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | ; |