mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 12:50:49 +08:00
avformat/segafilm: dont read uninitialized value
scratch[20] doesnt exist in version 0 Fixes: use of uninitialized memory Fixes: 471664627/clusterfuzz-testcase-minimized-ffmpeg_dem_SEGAFILM_fuzzer-4738726971637760 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
This commit is contained in:
@@ -163,7 +163,7 @@ static int film_read_header(AVFormatContext *s)
|
||||
st->codecpar->height = AV_RB32(&scratch[12]);
|
||||
|
||||
if (film->video_type == AV_CODEC_ID_RAWVIDEO) {
|
||||
if (scratch[20] == 24) {
|
||||
if (film->version == 0 || scratch[20] == 24) {
|
||||
st->codecpar->format = AV_PIX_FMT_RGB24;
|
||||
} else {
|
||||
av_log(s, AV_LOG_ERROR, "raw video is using unhandled %dbpp\n", scratch[20]);
|
||||
|
||||
Reference in New Issue
Block a user