Fixes: -nan is outside the range of representable values of type 'int' Fixes: 377072730/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-6545416570601472
Unified · Split
| @@ -422,7 +422,7 @@ static int ambisonics_config(void *s, AVIOContext *pb, · 421 unmodified lines | ||
| 422 | 422 | |
| 423 | 423 | output_channel_count = avio_r8(pb); // C |
| 424 | 424 | substream_count = avio_r8(pb); // N |
| 425 | − if (audio_element->nb_substreams != substream_count) | |
| 425 | + if (audio_element->nb_substreams != substream_count || output_channel_count == 0) | |
| 426 | 426 | return AVERROR_INVALIDDATA; |
| 427 | 427 | |
| 428 | 428 | order = floor(sqrt(output_channel_count - 1)); |