Change #265860
| Category | ffmpeg |
| Changed by | Ted Meyer <tmathmeyer@chromium.org> |
| Changed at | Wed 29 Apr 2026 01:46:56 |
| Repository | https://git.ffmpeg.org/ffmpeg.git |
| Project | ffmpeg |
| Branch | master |
| Revision | 53cd2c9f2a3db437ed8d33df5a2681007040f39d |
Comments
avformat/mov: Check read size for opus extradata in mov_read_dops, `size` bytes is allocated for `st->codecpar->extradata`, but ff_alloc_extradata doesn't memset, so the contents of that buffer are just old heap data. If `avio_read` reads fewer bytes than were requested, uninitialized data can still be left in the extradata buffer, which is operated on by AV_WL16A and AV_WL32A. I think the best solution here is to just check the read size and ensure it's filling the extradata buffer in it's entirety, or erroring out if there isn't enough data left.
Changed files
- libavformat/mov.c