Fixes: OOM Fixes: 56271/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-5290810045497344
Showing the changes to libavformat (1 of 1 file). Show all
Unified · Split
| @@ -730,6 +730,10 @@ smv_retry: · 729 unmodified lines | ||
| 730 | 730 | goto smv_out; |
| 731 | 731 | } |
| 732 | 732 | size = avio_rl24(s->pb); |
| 733 | + if (size > wav->smv_block_size) { | |
| 734 | + ret = AVERROR_EOF; | |
| 735 | + goto smv_out; | |
| 736 | + } | |
| 733 | 737 | ret = av_get_packet(s->pb, pkt, size); |
| 734 | 738 | if (ret < 0) |
| 735 | 739 | goto smv_out; |