[FFmpeg-devel] [PATCH] avformat/rtsp: Don't free uninitialized AVBPrint

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Mon Apr 20 19:26:43 EEST 2020


Marton Balint:
> 
> 
> On Mon, 20 Apr 2020, Andreas Rheinhardt wrote:
> 
>> Fixes Coverity ID 1462307.
>>
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
>> ---
>> I intend to apply this soon if there are no objections.
>>
>> libavformat/rtsp.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
>> index 49f7644fab..0a6462000d 100644
>> --- a/libavformat/rtsp.c
>> +++ b/libavformat/rtsp.c
>> @@ -2567,8 +2567,8 @@ static int rtp_read_header(AVFormatContext *s)
>> fail_nobuf:
>>     ret = AVERROR(ENOMEM);
>>     av_log(s, AV_LOG_ERROR, "rtp_read_header(): not enough buffer
>> space for sdp-headers\n");
>> -fail:
>>     av_bprint_finalize(&sdp, NULL);
>> +fail:
>>     avcodec_parameters_free(&par);
>>     if (in)
>>         ffurl_close(in);
> 
> LGTM thanks. I guess this rtsp fix has a series of bad luck :)
> 
> Regards,
> Marton

Applied, thanks.

- Andreas


More information about the ffmpeg-devel mailing list