Re: [FFmpeg-devel] [PATCH] matroskaenc: fix leak on error

2019-04-09 Thread James Almer
On 4/9/2019 10:28 AM, Tristan Matthews wrote:
> On Thu, Apr 4, 2019 at 12:56 PM Tristan Matthews  wrote:
>>
>> ---
>>  libavformat/matroskaenc.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
>> index b9f99c4463..1a06103c5d 100644
>> --- a/libavformat/matroskaenc.c
>> +++ b/libavformat/matroskaenc.c
>> @@ -694,8 +694,10 @@ static int put_flac_codecpriv(AVFormatContext *s,
>>  av_dict_set(, "WAVEFORMATEXTENSIBLE_CHANNEL_MASK", buf, 0);
>>
>>  len = ff_vorbiscomment_length(dict, vendor, NULL, 0);
>> -if (len >= ((1<<24) - 4))
>> +if (len >= ((1<<24) - 4)) {
>> +av_dict_free();
>>  return AVERROR(EINVAL);
>> +}
>>
>>  data = av_malloc(len + 4);
>>  if (!data) {
>> --
>> 2.17.1
>>
> 
> Ping (this shouldn't conflict with any of the recent matroskaenc patches).
> 
> Best,
> Tristan

Pushed, thanks.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] matroskaenc: fix leak on error

2019-04-09 Thread Tristan Matthews
On Thu, Apr 4, 2019 at 12:56 PM Tristan Matthews  wrote:
>
> ---
>  libavformat/matroskaenc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index b9f99c4463..1a06103c5d 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -694,8 +694,10 @@ static int put_flac_codecpriv(AVFormatContext *s,
>  av_dict_set(, "WAVEFORMATEXTENSIBLE_CHANNEL_MASK", buf, 0);
>
>  len = ff_vorbiscomment_length(dict, vendor, NULL, 0);
> -if (len >= ((1<<24) - 4))
> +if (len >= ((1<<24) - 4)) {
> +av_dict_free();
>  return AVERROR(EINVAL);
> +}
>
>  data = av_malloc(len + 4);
>  if (!data) {
> --
> 2.17.1
>

Ping (this shouldn't conflict with any of the recent matroskaenc patches).

Best,
Tristan
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] matroskaenc: fix leak on error

2019-04-04 Thread Tristan Matthews
---
 libavformat/matroskaenc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index b9f99c4463..1a06103c5d 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -694,8 +694,10 @@ static int put_flac_codecpriv(AVFormatContext *s,
 av_dict_set(, "WAVEFORMATEXTENSIBLE_CHANNEL_MASK", buf, 0);
 
 len = ff_vorbiscomment_length(dict, vendor, NULL, 0);
-if (len >= ((1<<24) - 4))
+if (len >= ((1<<24) - 4)) {
+av_dict_free();
 return AVERROR(EINVAL);
+}
 
 data = av_malloc(len + 4);
 if (!data) {
-- 
2.17.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".