Add vp9_raw_reorder_frame_free() before "ctx->next_frame = NULL;" to avoid
memory leak.
Fixes: 887a7817b6 ("lavc: move bitstream filters into bsf/ subdir")
Signed-off-by: Jiasheng Jiang
---
libavcodec/bsf/vp9_raw_reorder.c | 1 +
1 file changed, 1 insertion(+)
diff
Add check for av_packet_new_side_data() to avoid null pointer dereference if
allocation fails.
Fixes: bdc1220eeb ("h263enc: Add an option for outputting info about MBs as
side data")
Signed-off-by: Jiasheng Jiang
---
libavcodec/mpegvideo_enc.c | 2 ++
1 file changed, 2 insertion
Add check for av_packet_new_side_data() to avoid null pointer
dereference if allocation fails.
Fixes: bdc1220eeb ("h263enc: Add an option for outputting info about MBs as
side data")
Signed-off-by: Jiasheng Jiang
---
Changelog:
v1 -> v2: Wrap lines in the body of the c
d5 ("lavc/vp6: Implement "slice" threading for VP6A decode")
Signed-off-by: Jiasheng Jiang
---
libavcodec/vp6.c | 4
1 file changed, 4 insertions(+)
diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index d024370793..d75e717082 100644
--- a/libavcodec/vp6.c
+++ b/libavcodec/
Since the av_malloc() may fail and return NULL pointer,
it is needed that the 's->edge_emu_buffer' should be checked
whether the new allocation is success.
Fixes: d14723861b ("VP3: fix decoding of videos with stride > 2048")
Signed-off-by: Jiasheng Jiang
---
libavcodec
: f900a19fa9 ("libswscale: Adds ff_hscale8to15_4_avx2 and
ff_hscale8to15_X4_avx2 for all filter sizes.")
Signed-off-by: Jiasheng Jiang
---
libswscale/swscale_internal.h | 2 +-
libswscale/utils.c| 13 ++---
tests/checkasm/sw_scale.c | 3 ++-
3 files changed, 13
to prevent the dereference of the NULL pointer.
Also, the caller, the decode_init() needs to deal with the return value
of ff_mlz_init_dict().
Fixes: 2f7a12fab5 ("avcodec/mlz: clear dict on allocation to ensure there are
no uninitialized values")
Signed-off-by: Jiasheng Jiang
---
libav
As the potential failure of the memory allocation,
the avformat_new_stream() could return NULL pointer.
Therefore, it should be better to check it and return
error if fails.
Fixes: 84ad31ff18 ("lavf: replace av_new_stream->avformat_new_stream part II.")
Signed-off-by: J
cs dont match mine (didnt investigate yet)
samplerate is stored wrong by libnut (demuxer has a workaround) code is not
clean or beautifull yet, but i thought its better to commit early before
someone unneccesarily wastes his time duplicating the work demuxer split from
muxer")
Signed-off-by:
Andreas Rheinhardt:
>> As the potential failure of the memory allocation,
>> the avformat_new_stream() could return NULL pointer.
>> Therefore, it should be better to check it and return
>> error if fails.
>>
>> Fixes: 84ad31ff18 ("lavf: replace av_new_stream->avformat_new_stream part
>> II.")
>
Andreas Rheinhardt:
>> As the potential failure of the memory allocation,
>> the avformat_new_stream() could return NULL pointer.
>> Therefore, it should be better to check it and return
>> error if fails.
>>
>> Fixes: 84ad31ff18 ("lavf: replace av_new_stream->avformat_new_stream part
>> II.")
>
As the potential failure of the av_calloc(), it should be better
to check it and fail() if fails in order to avoid the dereference
of the NULL pointer.
Fixes: f679711c1b ("checkasm: add vf_nlmeans test for ssd_integral_image")
Signed-off-by: Jiasheng Jiang
---
tests/checkasm/vf_nlme
Michael Niedermayer:
>> diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
>> index 0a8a700acf..4cbccb20d9 100644
>> --- a/libavformat/nutdec.c
>> +++ b/libavformat/nutdec.c
>> @@ -220,6 +220,10 @@ static int decode_main_header(NUTContext *nut)
>> }
>>
>> GET_V(nut->time_base_coun
investigate yet)
samplerate is stored wrong by libnut (demuxer has a workaround) code is not
clean or beautifull yet, but i thought its better to commit early before
someone unneccesarily wastes his time duplicating the work demuxer split from
muxer")
Signed-off-by: Jiasheng Jiang
---
As the potential failure of the av_malloc(), the av_memdup()
could return NULL if fails.
Therefore, it should be better to check it and return error
if fails, like the av_buffer_ref().
Fixes: 535a835e51 ("ffmpeg: use display matrix frame side data for
autorotation")
Signed-off-by: Jias
As the potential failure of the memory allocation,
the 'p' could be NULL pointer.
Therefore, it should be better to check it in order
to avoid the dereferencing of the NULL pointer.
Fixes: 3729ae659f ("avcodec: add MagicYUV encoder")
Signed-off-by: Jiasheng Jiang
---
liba
As the potential failure of the memory allocation, the ff_get_extradata()
could return error if fails.
Therefore, it should be better to deal with the return value of the
ff_get_extradata() and return error if fails.
Fixes: 2d720069a9 ("avformat: add aix demuxer")
Signed-off-by: Jias
On Tue, Feb 22, 2022 at 04:10:51PM +0800, Paul B Mahol wrote:
>> As the potential failure of the memory allocation, the ff_get_extradata()
>> could return error if fails.
>> Therefore, it should be better to deal with the return value of the
>> ff_get_extradata() and return error if fails.
>>
>
>
Michael Niedermayer:
>> diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
>> index 0a8a700acf..32a4f6bbcb 100644
>> --- a/libavformat/nutdec.c
>> +++ b/libavformat/nutdec.c
>> @@ -351,8 +351,13 @@ static int decode_main_header(NUTContext *nut)
>> ret = AVERROR(ENOMEM);
>> g
investigate yet)
samplerate is stored wrong by libnut (demuxer has a workaround) code is not
clean or beautifull yet, but i thought its better to commit early before
someone unneccesarily wastes his time duplicating the work demuxer split from
muxer")
Signed-off-by: Jiasheng Jiang
---
Add check for the return value of av_malloc_array() and av_calloc()
to avoid potential NULL pointer dereference.
Fixes: dcfd24b10c ("avcodec/alsdec: Implement floating point sample data
decoding")
Signed-off-by: Jiasheng Jiang
---
libavcodec/alsdec.c | 6 +-
1 file changed, 5
Add check for the return value of av_malloc_array() and av_calloc()
to avoid potential NULL pointer dereference.
Fixes: dcfd24b10c ("avcodec/alsdec: Implement floating point sample data
decoding")
Signed-off-by: Jiasheng Jiang
---
Changelog:
1. Wrap the if condtion.
---
libavcode
Add av_freep() to free new_elem to avoid memory leak.
Fixes: 2d0bfbd0fa ("fftools/cmdutils: Use av_dynarray_add_nofree()")
Signed-off-by: Jiasheng Jiang
---
Changlog:
v1 -> v2:
1. Remove the unnecessary return NULL.
---
fftools/cmdutils.c | 7 +--
1 file changed, 5 ins
Add av_freep() to free new_elem to avoid memory leak.
Fixes: 2d0bfbd0fa ("fftools/cmdutils: Use av_dynarray_add_nofree()")
Signed-off-by: Jiasheng Jiang
---
fftools/cmdutils.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fftools/cmdutils.c b/fftools/
Add check for the return value of av_calloc() to avoid
potential NULL pointer dereference.
Fixes: 54f5fd22ea ("new opensource lossy/lossless audio codec based on speech
compression techniques (actually based on bonk)")
Signed-off-by: Jiasheng Jiang
---
libavcodec/sonic.c | 2 ++
1 fi
Add check for the return value of av_malloc_array() to avoid
potential NULL pointer dereference.
Fixes: 4acd08be6c ("ffplay: port to lavu/tx")
Signed-off-by: Jiasheng Jiang
---
fftools/ffplay.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fftools/ffplay.c
Add av_freep() to free new_elem to avoid memory leak.
Fixes: 3ca1e31e63 ("fftools/cmdutils: Atomically add elements to list of
pointers, fix crash")
Signed-off-by: Jiasheng Jiang
---
Changelog:
v2 -> v3:
1. Replace with a correct fixes tag.
v1 -> v2:
1. Remove the unneces
Add av_packet_free() to free pkt_au in the error paths.
Fixes: cfe2947887 ("avcodec/evc_decoder: Provided support for EVC decoder")
Signed-off-by: Jiasheng Jiang
---
libavcodec/libxevd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/libxevd.c b/libavcodec/libxe
Add av_free() to free extra_data if av_packet_add_side_data() fails.
Fixes: da3c69a5a9 ("Added test for libavcodec/avpacket.c")
Signed-off-by: Jiasheng Jiang
---
libavcodec/tests/avpacket.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/tests/avpacket.c b/libavc
Add check and av_frame_free() for the return value of av_frame_alloc() to avoid
potential NULL pointer dereference and memory leak.
Fixes: 88a8ba5c99 ("avcodec/amfenc: redesign to use hwcontext_amf.")
Signed-off-by: Jiasheng Jiang
---
libavcodec/amfenc.c | 5 +
1 file changed, 5
Add av_freep() to free avio_ctx_buffer if avio_alloc_context fails
to avoid potential memory leak.
Fixes: 5fc4dea39c ("examples: add avio_reading.c example")
Signed-off-by: Jiasheng Jiang
---
doc/examples/avio_read_callback.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/do
Add av_packet_free() to free avpkt_clone and avpkt in the error paths to avoid
potential memory leak.
Fixes: da3c69a5a9 ("Added test for libavcodec/avpacket.c")
Signed-off-by: Jiasheng Jiang
---
libavcodec/tests/avpacket.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavc
Add check for the return value of avcodec_alloc_context3() to avoid potential
NULL pointer dereference.
Fixes: 5d48e4eafa ("Merge commit 'a6a750c7ef240b72ce01e9653343a0ddf247d196'")
Signed-off-by: Jiasheng Jiang
---
libavcodec/tests/motion.c | 4
1 file changed, 4
Add av_free() to free s.temp_dwt_buffer and s.temp_idwt_buffer at the end of
the function to avoid memory leak.
Fixes: 5d48e4eafa ("Merge commit 'a6a750c7ef240b72ce01e9653343a0ddf247d196'")
Signed-off-by: Jiasheng Jiang
---
libavcodec/tests/snowenc.c | 7 ++-
1 file c
34 matches
Mail list logo