Commit 600c75c
flac: Fix validation checks found by fuzzing. (#438)
This commit adds validation checks to the FLAC decoder to prevent potential
panics or invalid behavior when processing malformed streams.
- Verify frame channel count matches the stream information.
- Ensure dropped bits per sample does not exceed frame bits per sample.
- Validate that the predictor order does not exceed the block size.1 parent 2675f10 commit 600c75c
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
361 | 366 | | |
362 | 367 | | |
363 | 368 | | |
| |||
417 | 422 | | |
418 | 423 | | |
419 | 424 | | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
420 | 429 | | |
421 | 430 | | |
422 | 431 | | |
| |||
434 | 443 | | |
435 | 444 | | |
436 | 445 | | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
437 | 450 | | |
438 | 451 | | |
439 | 452 | | |
| |||
0 commit comments