[FFmpeg-devel] [PATCH v14 2/5] compat/w32dlfcn.h: Remove MAX_PATH limit and replace LoadLibraryExA with LoadLibraryExW

Soft Works softworkz at hotmail.com
Thu Jun 16 03:00:39 EEST 2022



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> nil-admirari at mailo.com
> Sent: Wednesday, June 15, 2022 10:00 PM
> To: ffmpeg-devel at ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH v14 2/5] compat/w32dlfcn.h: Remove
> MAX_PATH limit and replace LoadLibraryExA with LoadLibraryExW
> 
> > path_size <= INT16_MAX
> >
> > (the edge case is already covered by the equals)
> 
> Done: https://ffmpeg.org/pipermail/ffmpeg-devel/2022-
> June/297590.html.
> Don't quite understand what edge case you've meant:
> INT16_MAX is 32767, which is the maximal path length allowed,
> + 1 is needed for the terminating null.

With the +1 your while condition term is effectively

     path_size <= 32768

But when the path_size is 32768, you do not need to
go for another loop with an increased buffer because this is
already as large as it can get. There won't be any 32769
or 32770 (...) cases, I think.

> > I know this line existed before your path, but it would be nice
> > to clarify check and condition, like:
> >
> > // On Win7 an earlier we check if KB2533623 is available
> 
> Changed the comment.

Cool. Thanks.

softworkz

> 
> > name_w leaks here
> 
> Fixed.


More information about the ffmpeg-devel mailing list