[PATCH 2/2] advpack/tests: Increase length of 'path' by 13.

Isira Seneviratne isirasen96 at gmail.com
Wed Sep 11 21:28:35 CDT 2019


On Sat, 7 Sep 2019, 11:16 pm Alex Henrie, <alexhenrie24 at gmail.com> wrote:

> On Sat, Sep 7, 2019 at 11:28 AM Alex Henrie <alexhenrie24 at gmail.com>
> wrote:
> >
> > On Sat, Sep 7, 2019 at 1:46 AM Alexandre Julliard <julliard at winehq.org>
> wrote:
> > >
> > > Alex Henrie <alexhenrie24 at gmail.com> writes:
> > >
> > > > I think that instead of making the buffer bigger, it would be better
> > > > to add kernelbase to the IMPORTS line of
> > > > dlls/advpack/tests/Makefile.in, include shlwapi.h in files.c, and
> then
> > > > change lstrcatA to StrCatBuffA.
> > >
> > > Arguably such buffer overflows in tests don't matter either way, but
> > > using a function that would silently truncate the path is not an
> > > improvement in general.
> >
> > That makes sense. However, I misspoke when I said to change lstrcatA
> > to StrCatBuffA: The compiler warning is about sprintf, not strcat. So
> > in this case I think it would make the most sense to replace the
> > sprintf with lstrcpyA and lstrcatA similar to the rest of the tests in
> > the function.
>
> Actually, PathCombineA would be even better.
>
> -Alex
>

Sorry for being late, I was a bit busy.

I'll use PathCombineA then.

Isira

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20190912/791db2ac/attachment-0001.htm>


More information about the wine-devel mailing list