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

Alex Henrie alexhenrie24 at gmail.com
Sat Sep 7 12:45:49 CDT 2019


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



More information about the wine-devel mailing list