setupapi: Remove invalid check for < MAX_PATH and don't copy to NULL PathBuffer (Coverity 888).
This commit is contained in:
parent
78a7ea5a39
commit
1999008b89
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue