[vlc-devel] [PATCH] directx: fix presumed memory leak

Steve Lhomme robux4 at ycbcr.xyz
Thu Oct 1 09:15:23 CEST 2020


On 2020-10-01 9:14, Steve Lhomme wrote:
> On 2020-10-01 9:00, Alexandre Janniaux wrote:
>> Hi,
>>
>> On Thu, Oct 01, 2020 at 07:43:10AM +0200, Steve Lhomme wrote:
>>> It's correct but I think a cleaner way would be to just allocate the 
>>> tables
>>> in the stack like
>>> DXVAHD_VPCAPS capsList[devcaps.VideoProcessorCount];
>>
>> I'm not sure we want to reintroduce new VLA in the code
>> though. That's not for nothing that it has been relegated
>> into an optional features in C11 and that IIRC compilers
>> like compcert don't want to implement them.
> 
> Personally I would use alloca() everywhere so we can try possible stack 
> overflow sources, but I don't think this policy was agreed on, let alone 
> the use of alloca().

s/track/try/


More information about the vlc-devel mailing list