[FFmpeg-devel] [PATCH] avcodec/h264_slice: Remove dead sps check

James Almer jamrial at gmail.com
Tue May 14 02:08:16 EEST 2024


On 5/13/2024 7:49 PM, Michael Niedermayer wrote:
> On Mon, May 13, 2024 at 06:15:16AM +0100, Kieran Kunhya wrote:
>> On Mon, 13 May 2024, 02:32 Michael Niedermayer, <michael at niedermayer.cc>
>> wrote:
>>
>>> On Mon, May 06, 2024 at 03:23:07AM +0200, Michael Niedermayer wrote:
>>>> Fixes: CID1439574 Dereference after null check
>>>>
>>>> Sponsored-by: Sovereign Tech Fund
>>>> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
>>>> ---
>>>>   libavcodec/h264_slice.c | 2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> will apply
>>>
>>
>> I don't understand what this fixes
> 
> it is not possible for sps to be NULL in this function (see line 1424)

It's also passed to ff_h264_init_poc(), which expects it to not be NULL.

In any case, when the coverity issues are about something that's not a 
bug but just noise like superfluous checks, might as well use something 
like "closes" rather than "fixes".


More information about the ffmpeg-devel mailing list