1
1
mirror of https://github.com/wader/fq.git synced 2024-11-23 18:56:52 +03:00

flac,fuzz: Fatal error on negative partition sample count

This commit is contained in:
Mattias Wadman 2022-10-18 13:40:25 +02:00
parent 16ab994b28
commit fb2a2b949c

View File

@ -452,6 +452,9 @@ func frameDecode(d *decode.D, in any) any {
if samplesLen < n+count { if samplesLen < n+count {
d.Fatalf("decodeResiduals outside block size") d.Fatalf("decodeResiduals outside block size")
} }
if count < 0 {
d.Fatalf("negative sample count %d", count)
}
if riceParameter == riceEscape { if riceParameter == riceEscape {
escapeSampleSize := int(d.FieldU5("escape_sample_size")) escapeSampleSize := int(d.FieldU5("escape_sample_size"))