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)
*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;
......
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