Fixes: use of uninitialized value Fixes: 70932/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4870202133643264
Unified · Split
| @@ -1556,7 +1556,8 @@ static int mxf_read_indirect_value(void *arg, AVIOContext *pb, int size) · 1555 unmodified lines | ||
| 1556 | 1556 | if (size <= 17) |
| 1557 | 1557 | return 0; |
| 1558 | 1558 | |
| 1559 | − avio_read(pb, key, 17); | |
| 1559 | + if (avio_read(pb, key, 17) != 17) | |
| 1560 | + return AVERROR_INVALIDDATA; | |
| 1560 | 1561 | /* TODO: handle other types of of indirect values */ |
| 1561 | 1562 | if (memcmp(key, mxf_indirect_value_utf16le, 17) == 0) { |
| 1562 | 1563 | return mxf_read_utf16le_string(pb, size - 17, &tagged_value->value); |