xlink used for depthai-core v2.21.2, master, and develop
Repro
Found during code review. Referencing above, line 118 should be removed. Line 123 does the correct decrement.
I also caution that lines 89 and 120 are missing a dangerous scenario. If numFoundDevices > sizeFoundDevices that means that memory was overwritten/corrupted. That scenario must never occur.
XLinkPlatformFindDevices()
errantly double-decrements when looking for TCPIP devices line 118 is wrong and should be removedhttps://github.com/luxonis/XLink/blob/d209b7eeb8ac68435df5097e57e1dfd8ea1d0e83/src/pc/PlatformDeviceSearch.c#L115-L124
Setup
master
, anddevelop
Repro
Found during code review. Referencing above, line 118 should be removed. Line 123 does the correct decrement.
I also caution that lines 89 and 120 are missing a dangerous scenario. If
numFoundDevices > sizeFoundDevices
that means that memory was overwritten/corrupted. That scenario must never occur.