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 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
		
							parent
							
								
									4fdfe430c1
								
							
						
					
					
						commit
						dd1ce72e68
					
				| @ -882,10 +882,11 @@ const AVCodec *av_codec_iterate(void **opaque) | |||||||
| 
 | 
 | ||||||
|     ff_thread_once(&av_codec_static_init, av_codec_init_static); |     ff_thread_once(&av_codec_static_init, av_codec_init_static); | ||||||
| 
 | 
 | ||||||
|     if (c) |     if (c) { | ||||||
|         *opaque = (void*)(i + 1); |         *opaque = (void*)(i + 1); | ||||||
| 
 |  | ||||||
|         return &c->p; |         return &c->p; | ||||||
|  |     } | ||||||
|  |     return NULL; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id) | static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user