setupapi: Don't copy into a NULL PathBuffer, and remove an invalid check for size < MAX_PATH (Coverity 888).

Ricardo Filipe ricardojdfilipe at gmail.com
Mon Mar 23 11:38:16 CDT 2009


i know it's not what it does, it's an alternative someone refered in irc. i
was wondering what you think would be the correct approach, since both fix
the problem, the alternative just goes against the msdn documentation, which
has been refered as not reliable :D

2009/3/23 James Hawkins <truiken at gmail.com>

> On Sun, Mar 22, 2009 at 4:04 PM, Ricardo Filipe
> <ricardojdfilipe at gmail.com> wrote:
> > my next task was to fix this eheh.
> > i think it would make more sense to just change
> >
> > if(!params->PathBuffer && !params->PathBufferSize)
> >
> > to
> >
> > if(!params->PathBuffer)
> >
>
> That's not what the patch does, but I did mistakenly leave an extra
> copy of requiredSize > params->PathBufferSize in the top if statement.
>  Feel free to send a correct patch.
>
> --
> James Hawkins
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090323/6b0679b7/attachment.htm>


More information about the wine-devel mailing list