[FFmpeg-cvslog] avformat/rawdec: fix identifier names
Michael Niedermayer
git at videolan.org
Tue Jul 7 21:40:26 EEST 2020
ffmpeg | branch: release/4.2 | Michael Niedermayer <michael at niedermayer.cc> | Wed Jun 3 21:00:01 2020 +0200| [e19a5624d5913144781ecf5d78133d1b54a7fb02] | committer: Michael Niedermayer
avformat/rawdec: fix identifier names
Fixes: out of array access
Fixes: 22686/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5121369624018944
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Anton Khirnov <anton at khirnov.net>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 71a822fa3514b82cde6701252bde0477aad21689)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e19a5624d5913144781ecf5d78133d1b54a7fb02
---
libavformat/rawdec.c | 2 ++
libavformat/rawdec.h | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
index 59b49e3f77..526cce8c13 100644
--- a/libavformat/rawdec.c
+++ b/libavformat/rawdec.c
@@ -123,6 +123,8 @@ const AVOption ff_rawvideo_options[] = {
{ "raw_packet_size", "", OFFSET(raw_packet_size), AV_OPT_TYPE_INT, {.i64 = RAW_PACKET_SIZE }, 1, INT_MAX, DEC},
{ NULL },
};
+#undef OFFSET
+#define OFFSET(x) offsetof(FFRawDemuxerContext, x)
const AVOption ff_raw_options[] = {
{ "raw_packet_size", "", OFFSET(raw_packet_size), AV_OPT_TYPE_INT, {.i64 = RAW_PACKET_SIZE }, 1, INT_MAX, DEC},
{ NULL },
diff --git a/libavformat/rawdec.h b/libavformat/rawdec.h
index 85e0790c86..34c8adcb19 100644
--- a/libavformat/rawdec.h
+++ b/libavformat/rawdec.h
@@ -95,7 +95,7 @@ static const AVClass name ## _demuxer_class = {\
};
#define FF_DEF_RAWSUB_DEMUXER(shortname, longname, probe, ext, id, flag)\
-FF_RAWVIDEO_DEMUXER_CLASS(shortname)\
+FF_RAWSUB_DEMUXER_CLASS(shortname)\
AVInputFormat ff_ ## shortname ## _demuxer = {\
.name = #shortname,\
.long_name = NULL_IF_CONFIG_SMALL(longname),\
More information about the ffmpeg-cvslog
mailing list