From 1999008b8932342377f023482be441b272cf5f5a Mon Sep 17 00:00:00 2001 From: Ricardo Filipe Date: Mon, 23 Mar 2009 17:05:59 +0000 Subject: [PATCH] setupapi: Remove invalid check for < MAX_PATH and don't copy to NULL PathBuffer (Coverity 888). --- dlls/setupapi/dialog.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/setupapi/dialog.c b/dlls/setupapi/dialog.c index 21135cdcd8b..948fa748648 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;