comdlg32: Avoid possible NULL pointer dereference (Coverity)

Kai Blin kai.blin at gmail.com
Tue Oct 14 05:54:49 CDT 2008


On Tuesday 14 October 2008 11:10:34 Kai Blin wrote:
> As the code checks for ofnW->lpstrFile not being NULL, it seems like
> PathFindFileNameW() and PathFindExtensionW() don't make sense on NULL
> ofnW->lpstrFile. If offset and extension are not updated, it doesn't make
> sense to call UpdateResults. So just abort if ofnW->lpstrFile is NULL.
>
> This fixes Coverity CID 108
> ---
>  dlls/comdlg32/filedlg31.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)

Of course I forgot to switch the logic. New patch coming up.


-- 
Kai Blin
WorldForge developer  http://www.worldforge.org/
Wine developer        http://wiki.winehq.org/KaiBlin
Samba team member     http://www.samba.org/samba/team/
--
Will code for cotton.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20081014/d3e9e626/attachment.pgp 


More information about the wine-devel mailing list