Commit 1999008b authored by Ricardo Filipe's avatar Ricardo Filipe Committed by Alexandre Julliard

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

parent 78a7ea5a
...@@ -108,13 +108,12 @@ static void promptdisk_ok(HWND hwnd, struct promptdisk_params *params) ...@@ -108,13 +108,12 @@ static void promptdisk_ok(HWND hwnd, struct promptdisk_params *params)
*params->PathRequiredSize = requiredSize; *params->PathRequiredSize = requiredSize;
TRACE("returning PathRequiredSize=%d\n",*params->PathRequiredSize); TRACE("returning PathRequiredSize=%d\n",*params->PathRequiredSize);
} }
if(!params->PathBuffer && !params->PathBufferSize) if(!params->PathBuffer)
{ {
EndDialog(hwnd, NO_ERROR); EndDialog(hwnd, NO_ERROR);
return; return;
} }
if(params->PathBuffer && (requiredSize > params->PathBufferSize if(requiredSize > params->PathBufferSize)
|| params->PathBufferSize < MAX_PATH))
{ {
EndDialog(hwnd, DPROMPT_BUFFERTOOSMALL); EndDialog(hwnd, DPROMPT_BUFFERTOOSMALL);
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment