Ricardo Filipe : setupapi: Remove invalid check for < MAX_PATH and don' t copy to NULL PathBuffer (Coverity 888).

Alexandre Julliard julliard at winehq.org
Tue Mar 24 09:01:56 CDT 2009


Module: wine
Branch: master
Commit: 1999008b8932342377f023482be441b272cf5f5a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1999008b8932342377f023482be441b272cf5f5a

Author: Ricardo Filipe <ricardo_barbano at hotmail.com>
Date:   Mon Mar 23 17:05:59 2009 +0000

setupapi: Remove invalid check for < MAX_PATH and don't copy to NULL PathBuffer (Coverity 888).

---

 dlls/setupapi/dialog.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/setupapi/dialog.c b/dlls/setupapi/dialog.c
index 21135cd..948fa74 100644
--- a/dlls/setupapi/dialog.c
+++ b/dlls/setupapi/dialog.c
@@ -108,13 +108,12 @@ static void promptdisk_ok(HWND hwnd, struct promptdisk_params *params)
         *params->PathRequiredSize = requiredSize;
         TRACE("returning PathRequiredSize=%d\n",*params->PathRequiredSize);
     }
-    if(!params->PathBuffer && !params->PathBufferSize)
+    if(!params->PathBuffer)
     {
         EndDialog(hwnd, NO_ERROR);
         return;
     }
-    if(params->PathBuffer && (requiredSize > params->PathBufferSize
-        || params->PathBufferSize < MAX_PATH))
+    if(requiredSize > params->PathBufferSize)
     {
         EndDialog(hwnd, DPROMPT_BUFFERTOOSMALL);
         return;




More information about the wine-cvs mailing list