Don't allow to overflow dev_array array
This commit is contained in:
parent
59aa24e1e5
commit
9fd86bee46
@ -670,7 +670,7 @@ static UINT handle_hotplug(rdpdrPlugin* rdpdr)
|
||||
if (!path)
|
||||
continue;
|
||||
/* copy hotpluged device mount point to the dev_array */
|
||||
if (isAutomountLocation(path) && (size <= MAX_USB_DEVICES))
|
||||
if (isAutomountLocation(path) && (size < MAX_USB_DEVICES))
|
||||
{
|
||||
dev_array[size].path = _strdup(path);
|
||||
dev_array[size++].to_add = TRUE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user