Don't allow to overflow dev_array array

This commit is contained in:
qarmin 2020-05-01 20:11:03 +02:00 committed by akallabeth
parent 59aa24e1e5
commit 9fd86bee46

View File

@ -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;