History

avcodec/allcodecs: Dont play with NULLs

Fixes: member access within null pointer of type 'const FFCodec' (aka 'const struct FFCodec') Fixes: 45726/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6554445419249664

Michael Niedermayer committed 4 years ago

Commit dd1ce721 parent 4fdfe431 file · +4 −3Browse files

Showing the changes to libavcodec/allcodecs.c (1 of 1 file). Show all

Unified · Split

libavcodec/allcodecs.c+4−3
@@ -882,10 +882,11 @@ const AVCodec *av_codec_iterate(void **opaque) · 881 unmodified lines
882 882
883 ff_thread_once(&av_codec_static_init, av_codec_init_static);883 ff_thread_once(&av_codec_static_init, av_codec_init_static);
884 884
885 if (c)885 if (c) {
886 *opaque = (void*)(i + 1);886 *opaque = (void*)(i + 1);
887 887 return &c->p;
888 return &c->p;888 }
889 return NULL;
889}890}
890 891
891static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id)892static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t