[FFmpeg-devel] Re: [PATCH 3/3] nutdec: fix various memleaks on failure

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Sat May 23 11:05:48 CEST 2015


On 23.05.2015 10:52, Andreas Cadhalpun wrote:
> On 23.05.2015 01:36, Michael Niedermayer wrote:
>> On Fri, May 22, 2015 at 11:36:55PM +0200, Andreas Cadhalpun wrote:
>> [...]
>>> @@ -1095,10 +1121,14 @@ static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code)
>>>      pkt->pos = avio_tell(bc); // FIXME
>>>      if (stc->last_flags & FLAG_SM_DATA) {
>>>          int sm_size;
>>> -        if (read_sm_data(s, bc, pkt, 0, pkt->pos + size) < 0)
>>> -            return AVERROR_INVALIDDATA;
>>> -        if (read_sm_data(s, bc, pkt, 1, pkt->pos + size) < 0)
>>> -            return AVERROR_INVALIDDATA;
>>> +        if (read_sm_data(s, bc, pkt, 0, pkt->pos + size) < 0) {
>>> +            ret = AVERROR_INVALIDDATA;
>>> +            goto fail;
>>> +        }
>>> +        if (read_sm_data(s, bc, pkt, 1, pkt->pos + size) < 0) {
>>> +            ret = AVERROR_INVALIDDATA;
>>> +            goto fail;
>>> +        }
>>
>> it seems this function is missing a int ret
> 
> It was added in commit af7ca6ea.

You meant that decode_frame_header missed a int ret.
Fixed now.

Best regards,
Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-nutdec-fix-various-memleaks-on-failure.patch
Type: text/x-diff
Size: 8801 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150523/c3e9272b/attachment.bin>


More information about the ffmpeg-devel mailing list