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 12:04:08 CDT 2009


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

> On Mon, Mar 23, 2009 at 9:38 AM, Ricardo Filipe
> <ricardojdfilipe at gmail.com> wrote:
> > 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
> >
>
> Please bottom-post on this mailing list.  My patch is correct except
> for what I said earlier, so just take it, remove that bit and resubmit
> it.
>
> --
> James Hawkins
>

yes, your patch is correct. i was criticizing my implementation, and i just
tested and i'm right in the critic, it returns NO_ERROR even if i give a
null pathbuffer and not null pathbuffersize.
so i'll send a patch to correct this, just not the way you did, i was just
asking an opinion on the implementation ;)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090323/065d887d/attachment.htm>


More information about the wine-devel mailing list