Fixes: use of uninitialized memory Fixes: 394990189/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6431722199908352
Unified · Split
| @@ -1407,7 +1407,9 @@ static int mov_read_adrm(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 1406 unmodified lines | ||
| 1407 | 1407 | avio_read(pb, output, 8); // go to offset 8, absolute position 0x251 |
| 1408 | 1408 | avio_read(pb, input, DRM_BLOB_SIZE); |
| 1409 | 1409 | avio_read(pb, output, 4); // go to offset 4, absolute position 0x28d |
| 1410 | − avio_read(pb, file_checksum, 20); | |
| 1410 | + ret = ffio_read_size(pb, file_checksum, 20); | |
| 1411 | + if (ret < 0) | |
| 1412 | + goto fail; | |
| 1411 | 1413 | |
| 1412 | 1414 | // required by external tools |
| 1413 | 1415 | ff_data_to_hex(checksum_string, file_checksum, sizeof(file_checksum), 1); |