1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00
FFmpeg/libavfilter
Andreas Rheinhardt 5bc83dd89d avfilter/vf_paletteuse: Fix leaks of AVFilterFormats on error
The paletteuse's query_formats function allocated three AVFilterFormats
before storing them permanently. If allocating one of them failed, the
three AVFilterFormats structures would be freed with av_freep() which
does not free separately allocated subelements (namely the formats
array) which leak.

Furthermore, if storing one of the first two fails, the function simply
returns and the ones not yet stored leak.

These leaks have been fixed by only creating a new AVFilterFormats after
the last one has already been permanently stored. Furthermore, it is
enough to check whether the elements have been properly stored as
ff_formats_ref() by design returns AVERROR(ENOMEM) if it is provided a
NULL AVFilterFormats *.

Fixes Coverity issues #1270818 and #1270819.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit 6a65449954)
2021-02-27 07:20:57 +01:00
..
aarch64
dnn dnn_backend_native: Add overflow check for length calculation. 2020-07-06 20:25:50 +08:00
opencl
tests lavfi/tests/formats: reindent. 2020-05-23 15:50:20 +02:00
x86 x86/vf_blend: fix warnings about trailing empty parameters 2020-07-12 11:39:35 -03:00
.gitignore
aeval.c
af_acontrast.c
af_acopy.c
af_acrossover.c avfilter/af_acrossover: Check sscanf() return value 2020-04-17 16:56:13 +02:00
af_acrusher.c
af_adeclick.c
af_adelay.c avfilter/af_adelay: Check sscanf() return value 2020-05-01 06:36:36 +08:00
af_aderivative.c
af_aecho.c
af_aemphasis.c
af_afade.c
af_afftdn.c
af_afftfilt.c
af_afir.c avfilter/af_afir: Fix leak of AVFilterChannelLayout in case of error 2021-02-27 07:20:56 +01:00
af_afir.h
af_aformat.c
af_agate.c
af_aiir.c avfilter/af_aiir: simplify polynomial evaluation 2020-05-30 18:04:14 +02:00
af_alimiter.c
af_amerge.c
af_amix.c avfilter/af_amix: make weights option runtime configured 2020-04-29 19:18:25 +02:00
af_amultiply.c
af_anequalizer.c
af_anlmdn.c
af_anlmdndsp.h
af_anlms.c
af_anull.c
af_apad.c
af_aphaser.c
af_apulsator.c
af_aresample.c
af_arnndn.c
af_asetnsamples.c
af_asetrate.c
af_ashowinfo.c
af_asoftclip.c
af_asr.c
af_astats.c avfilter/af_astats: add noise floor count stat 2020-04-17 13:28:01 +02:00
af_asubboost.c avfilter: add asubboost filter 2020-04-30 12:18:36 +02:00
af_atempo.c
af_axcorrelate.c
af_biquads.c avfilter/af_biquads: implement 1st order allpass 2020-05-30 09:57:04 +02:00
af_bs2b.c
af_channelmap.c
af_channelsplit.c
af_chorus.c
af_compand.c Stop hardcoding align=32 in av_frame_get_buffer() calls. 2020-05-22 14:38:57 +02:00
af_compensationdelay.c Stop hardcoding align=32 in av_frame_get_buffer() calls. 2020-05-22 14:38:57 +02:00
af_crossfeed.c avfilter/af_crossfeed: make options runtime configurable 2020-04-30 12:18:36 +02:00
af_crystalizer.c
af_dcshift.c
af_deesser.c
af_drmeter.c
af_dynaudnorm.c
af_earwax.c
af_extrastereo.c
af_firequalizer.c
af_flanger.c
af_haas.c
af_hdcd.c
af_headphone.c
af_join.c
af_ladspa.c
af_loudnorm.c s->target_i and global are in dB but s->target_tp and true_peak are 2020-05-01 21:36:07 -07:00
af_lv2.c
af_mcompand.c
af_pan.c
af_replaygain.c
af_resample.c
af_rubberband.c
af_sidechaincompress.c
af_silencedetect.c
af_silenceremove.c
af_sofalizer.c
af_stereotools.c
af_stereowiden.c
af_superequalizer.c
af_surround.c
af_tremolo.c
af_vibrato.c
af_volume.c
af_volume.h
af_volumedetect.c
allfilters.c avfilter: add dblur video filter 2020-05-30 18:04:14 +02:00
asink_anullsink.c
asrc_afirsrc.c
asrc_anoisesrc.c avfilter/asrc_anoisesrc: switch to activate 2020-06-06 15:53:07 +02:00
asrc_anullsrc.c
asrc_flite.c
asrc_hilbert.c
asrc_sinc.c
asrc_sine.c
atadenoise.h
audio.c
audio.h
avf_abitscope.c
avf_ahistogram.c
avf_aphasemeter.c
avf_avectorscope.c
avf_concat.c
avf_showcqt.c Stop hardcoding align=32 in av_frame_get_buffer() calls. 2020-05-22 14:38:57 +02:00
avf_showcqt.h
avf_showfreqs.c
avf_showspatial.c
avf_showspectrum.c avfilter/avf_showspectrum: properly handle EOF case 2020-06-06 19:49:14 +02:00
avf_showvolume.c
avf_showwaves.c
avfilter.c
avfilter.h
avfiltergraph.c Revert "lavfi/avfiltergraph: add check before free the format" 2021-02-27 07:20:56 +01:00
avfilterres.rc
bbox.c
bbox.h
blend.h
boxblur.c
boxblur.h
bufferqueue.h
buffersink.c
buffersink.h
buffersrc.c
buffersrc.h
bwdif.h
colorspace.c
colorspace.h
colorspacedsp_template.c
colorspacedsp_yuv2yuv_template.c
colorspacedsp.c
colorspacedsp.h
convolution.h
deshake.h
dnn_interface.h
drawutils.c
drawutils.h
ebur128.c avfilter/ebur128: prefer to use variable instead of type for sizeof 2020-04-09 15:03:36 +02:00
ebur128.h
f_bench.c
f_cue.c
f_drawgraph.c
f_ebur128.c
f_graphmonitor.c
f_interleave.c avfilter/f_interleave: no need to check for inlink eof if non-empty queue 2020-04-25 13:35:22 +02:00
f_loop.c
f_metadata.c
f_perms.c
f_realtime.c
f_reverse.c
f_select.c
f_sendcmd.c
f_sidedata.c
f_streamselect.c
f_zmq.c
fifo.c
filters.h
formats.c avfilter/formats: Fix heap-buffer overflow when merging channel layouts 2021-02-27 07:20:56 +01:00
formats.h lavfi/formats: add ff_formats_pixdesc_filter(). 2020-05-23 15:50:20 +02:00
framepool.c
framepool.h
framequeue.c
framequeue.h
framerate.h
framesync.c lavfi/framesync: use av_gcd_q(). 2020-05-23 15:51:45 +02:00
framesync.h
gblur.h
generate_wave_table.c
generate_wave_table.h
glslang.cpp
glslang.h
gradfun.h
graphdump.c
graphparser.c avfilter/graphparser: Fix memleak when linking filters fails 2021-02-27 07:20:56 +01:00
hermite.h
hflip.h
internal.h
lavfutils.c
lavfutils.h
libavfilter.v
limiter.h
log2_tab.c
lswsutils.c
lswsutils.h
Makefile avfilter: add dblur video filter 2020-05-30 18:04:14 +02:00
maskedclamp.h
maskedmerge.h
median_template.c
median.h
motion_estimation.c
motion_estimation.h
opencl_source.h
opencl.c
opencl.h
phase_template.c
psnr.h
pthread.c
qsvvpp.c
qsvvpp.h
removegrain.h
scale_eval.c
scale_eval.h
scene_sad.c
scene_sad.h
setpts.c
settb.c
signature_lookup.c
signature.h
split.c
src_movie.c
ssim.h
stereo3d.h
thread.h
threshold.h
tinterlace.h
transform.c
transform.h
transpose.h
trim.c
unsharp.h
v360.h
vaapi_vpp.c
vaapi_vpp.h
vaf_spectrumsynth.c
version.h Bump minor versions to separate 4.3 from master 2020-06-08 22:49:04 +02:00
vf_addroi.c
vf_alphamerge.c
vf_amplify.c
vf_aspect.c
vf_atadenoise.c
vf_avgblur_opencl.c
vf_avgblur_vulkan.c lavfi/vulkan: use av_get_random_seed instead of rand 2020-05-29 13:10:58 +01:00
vf_avgblur.c
vf_bbox.c
vf_bilateral.c
vf_bitplanenoise.c
vf_blackdetect.c doc/filters: clarify metadata and logging for blackdetect 2020-04-13 11:23:24 +05:30
vf_blackframe.c
vf_blend.c avfilter/vf_blend: add support for float formats 2020-05-26 23:27:02 +02:00
vf_bm3d.c
vf_boxblur.c
vf_bwdif.c
vf_cas.c
vf_chromaber_vulkan.c lavfi/vulkan: use av_get_random_seed instead of rand 2020-05-29 13:10:58 +01:00
vf_chromakey.c avfilter/vf_chromakey: fix formula for calculation of difference 2020-05-19 20:10:34 +02:00
vf_chromashift.c
vf_ciescope.c
vf_codecview.c
vf_colorbalance.c avfilter/vf_colorbalance:: Fix for framecrc bitexact for 32bit and 64bit system 2020-05-14 09:15:46 +08:00
vf_colorchannelmixer.c
vf_colorconstancy.c
vf_colorkey_opencl.c
vf_colorkey.c avfilter/vf_colorkey: fix formula for calculation of difference 2020-05-19 20:10:34 +02:00
vf_colorlevels.c
vf_colormatrix.c
vf_colorspace.c
vf_convolution_opencl.c
vf_convolution.c
vf_convolve.c
vf_copy.c
vf_coreimage.m
vf_cover_rect.c
vf_crop.c lavfi/vf_crop: use ff_formats_pixdesc_filter(). 2020-05-23 15:50:20 +02:00
vf_cropdetect.c
vf_curves.c
vf_datascope.c avfilter/vf_pixscope: also show standard deviation of zoomed area 2020-04-26 12:27:36 +02:00
vf_dblur.c avfilter: add dblur video filter 2020-05-30 18:04:14 +02:00
vf_dctdnoiz.c
vf_deband.c
vf_deblock.c
vf_decimate.c
vf_dedot.c
vf_deflicker.c
vf_deinterlace_qsv.c
vf_deinterlace_vaapi.c
vf_dejudder.c
vf_delogo.c avfilter/delogo: correct indentation for option show. 2020-04-11 11:46:48 +05:30
vf_derain.c avfilter/vf_derain.c: put all the calculation in model file. 2020-04-07 11:04:47 +08:00
vf_deshake_opencl.c
vf_deshake.c lavf, lavfi: Remove uses of sizeof(char). 2020-04-04 23:21:14 +02:00
vf_despill.c
vf_detelecine.c
vf_displace.c
vf_dnn_processing.c avfilter/vf_dnn_processing.c: fix typo for the linesize of dnn data 2020-04-07 11:03:25 +08:00
vf_drawbox.c
vf_drawtext.c avfilter/vf_drawtext: only test available exceptions 2020-04-09 00:59:21 +02:00
vf_edgedetect.c
vf_elbg.c
vf_entropy.c
vf_eq.c
vf_eq.h
vf_extractplanes.c
vf_fade.c
vf_fftdnoiz.c
vf_fftfilt.c
vf_field.c
vf_fieldhint.c
vf_fieldmatch.c
vf_fieldorder.c
vf_fillborders.c
vf_find_rect.c Stop hardcoding align=32 in av_frame_get_buffer() calls. 2020-05-22 14:38:57 +02:00
vf_floodfill.c
vf_format.c
vf_fps.c
vf_framepack.c
vf_framerate.c avfilter/vf_framerate: fix infinite loop with 1-frame input 2020-12-30 23:47:53 +01:00
vf_framestep.c
vf_freezedetect.c
vf_freezeframes.c
vf_frei0r.c
vf_fspp.c
vf_fspp.h
vf_gblur.c
vf_geq.c
vf_gradfun.c
vf_hflip.c
vf_histeq.c
vf_histogram.c
vf_hqdn3d.c
vf_hqdn3d.h
vf_hqx.c
vf_hue.c
vf_hwdownload.c
vf_hwmap.c
vf_hwupload_cuda.c
vf_hwupload.c
vf_hysteresis.c
vf_idet.c
vf_idet.h
vf_il.c
vf_kerndeint.c
vf_lagfun.c
vf_lenscorrection.c
vf_lensfun.c
vf_libopencv.c
vf_libvmaf.c
vf_limiter.c
vf_lumakey.c
vf_lut2.c
vf_lut3d.c avfilter/vf_lut3d: Fix mixed declaration and code 2020-06-01 15:21:40 +02:00
vf_lut.c
vf_maskedclamp.c
vf_maskedmerge.c
vf_maskedminmax.c
vf_maskedthreshold.c avfilter: add maskedthreshold filter 2020-04-18 12:34:49 +02:00
vf_maskfun.c
vf_mcdeint.c
vf_median.c
vf_mergeplanes.c
vf_mestimate.c
vf_midequalizer.c
vf_minterpolate.c Revert "avfilter/vf_minterpolate: if metadata lavfi.scd.mafd exists, we'll use it first" 2020-05-15 18:35:51 +02:00
vf_misc_vaapi.c
vf_mix.c avfilter/vf_mix: Check sscanf() return value 2020-05-01 06:36:36 +08:00
vf_mpdecimate.c
vf_neighbor_opencl.c
vf_neighbor.c
vf_nlmeans_opencl.c
vf_nlmeans.c
vf_nlmeans.h
vf_nnedi.c
vf_noise.c
vf_noise.h
vf_normalize.c
vf_null.c
vf_ocr.c
vf_overlay_cuda.c
vf_overlay_cuda.cu
vf_overlay_opencl.c
vf_overlay_qsv.c
vf_overlay_vulkan.c lavfi/vulkan: use av_get_random_seed instead of rand 2020-05-29 13:10:58 +01:00
vf_overlay.c
vf_overlay.h
vf_owdenoise.c
vf_pad_opencl.c
vf_pad.c
vf_palettegen.c
vf_paletteuse.c avfilter/vf_paletteuse: Fix leaks of AVFilterFormats on error 2021-02-27 07:20:57 +01:00
vf_perspective.c
vf_phase.c
vf_photosensitivity.c
vf_pixdesctest.c
vf_pp7.c
vf_pp7.h
vf_pp.c
vf_premultiply.c
vf_procamp_vaapi.c
vf_program_opencl.c
vf_pseudocolor.c
vf_psnr.c
vf_pullup.c
vf_pullup.h
vf_qp.c
vf_random.c
vf_readeia608.c
vf_readvitc.c
vf_remap.c
vf_removegrain.c
vf_removelogo.c
vf_repeatfields.c
vf_rotate.c
vf_sab.c
vf_scale_cuda.c
vf_scale_cuda.cu
vf_scale_npp.c
vf_scale_qsv.c
vf_scale_vaapi.c
vf_scale_vulkan.c lavfi/vulkan: use av_get_random_seed instead of rand 2020-05-29 13:10:58 +01:00
vf_scale.c
vf_scdet.c avfilter/vf_scdet: add filter to detect scene change 2020-05-14 23:03:06 +08:00
vf_scroll.c
vf_selectivecolor.c
vf_separatefields.c
vf_setparams.c
vf_showinfo.c vf_showinfo: support AV_FRAME_DATA_VIDEO_ENC_PARAMS 2020-05-12 09:37:47 +02:00
vf_showpalette.c
vf_shuffleframes.c
vf_shuffleplanes.c
vf_signalstats.c Stop hardcoding align=32 in av_frame_get_buffer() calls. 2020-05-22 14:38:57 +02:00
vf_signature.c
vf_smartblur.c
vf_spp.c pixblockdsp, avdct: Add get_pixels_unaligned 2020-05-13 13:20:08 +03:00
vf_spp.h avfilter/vf_spp: Remove unused AVCodecContext 2020-05-12 01:00:28 +02:00
vf_sr.c
vf_ssim.c
vf_stack.c
vf_stereo3d.c
vf_subtitles.c
vf_super2xsai.c
vf_swaprect.c
vf_swapuv.c
vf_telecine.c avfilter/vf_telecine: avoid possible null-pointer dereference 2020-04-14 12:12:42 +02:00
vf_threshold.c
vf_thumbnail_cuda.c
vf_thumbnail_cuda.cu
vf_thumbnail.c
vf_tile.c
vf_tinterlace.c
vf_tonemap_opencl.c
vf_tonemap_vaapi.c
vf_tonemap.c
vf_tpad.c
vf_transpose_npp.c
vf_transpose_opencl.c
vf_transpose_vaapi.c
vf_transpose.c
vf_unsharp_opencl.c
vf_unsharp.c
vf_untile.c lavfi: add untile filter. 2020-05-23 15:52:27 +02:00
vf_uspp.c
vf_v360.c avfilter/vf_v360: make FOV adjusted for dual fisheye too 2020-04-29 19:18:25 +02:00
vf_vaguedenoiser.c avfilter/vf_vaguedenoiser: add new type of threshold 2020-06-07 15:20:25 +02:00
vf_vectorscope.c
vf_vflip.c
vf_vfrdet.c
vf_vibrance.c
vf_vidstabdetect.c
vf_vidstabtransform.c
vf_vignette.c
vf_vmafmotion.c
vf_vpp_qsv.c
vf_w3fdif.c
vf_waveform.c
vf_weave.c
vf_xbr.c
vf_xfade_opencl.c
vf_xfade.c avfilter/vf_xfade: add slice transitions 2020-04-07 13:51:25 +02:00
vf_xmedian.c avfilter: add tmedian filter 2020-04-18 12:34:49 +02:00
vf_yadif_cuda.c
vf_yadif_cuda.cu
vf_yadif.c
vf_yaepblur.c
vf_zoompan.c
vf_zscale.c
video.c
video.h
vidstabutils.c
vidstabutils.h
vmaf_motion.h
vsink_nullsink.c
vsrc_cellauto.c
vsrc_gradients.c avfilter: add gradients source video filter 2020-05-19 20:10:34 +02:00
vsrc_life.c
vsrc_mandelbrot.c avfilter/vsrc_mandelbrot: unbreak configuring rate value 2020-05-16 11:10:32 +02:00
vsrc_mptestsrc.c
vsrc_sierpinski.c avfilter/vsrc_sierpinski: unbreak configuring rate value 2020-05-16 11:13:46 +02:00
vsrc_testsrc.c
vulkan.c lavfi/vulkan: fix queue counts and set indices 2020-05-26 10:52:11 +01:00
vulkan.h lavfi/vulkan: use all enabled queues in the queue family 2020-05-23 19:07:50 +01:00
w3fdif.h
window_func.h
yadif_common.c
yadif.h