comdlg32: Avoid possible NULL pointer dereference (Coverity)

Kai Blin kai.blin at gmail.com
Tue Oct 14 04:10:34 CDT 2008


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(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: acff0707b770edb860bf59c3265bff9c56a78a71.diff
Type: text/x-patch
Size: 589 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20081014/3b7e9bca/attachment.bin 


More information about the wine-patches mailing list