[FFmpeg-devel] swscale: fix style issues and check malloc in ff_shuffle_filter_coefficients

Lynne dev at lynne.ee
Tue Dec 21 22:53:14 EET 2021


21 Dec 2021, 20:18 by andreas.rheinhardt at outlook.com:

> Lynne:
>
>>
>> +        if (filterSize > 4) {
>> +            int16_t *tmp2 = av_malloc(dstW * filterSize * 2);
>> +            if (!tmp2)
>> +                return AVERROR(ENOMEM);
>> +
>> +            memcpy(tmp2, filter, dstW * filterSize * 2);
>>
>
> Could use av_memdup().
>

v2 attached, also fixed lack of return value on 32-bit systems

-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-swscale-fix-style-issues-and-check-malloc-in-ff_s.patch
Type: text/x-patch
Size: 5625 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20211221/b605e600/attachment.bin>


More information about the ffmpeg-devel mailing list