Fixed wrong length argument in getInterfacePhysicalByName.
This commit is contained in:
parent
bb993e0127
commit
b168f12a48
|
@ -682,7 +682,7 @@ DWORD getInterfacePhysicalByName(const char *name, PDWORD len, PBYTE addr,
|
||||||
if (!name || !len || !addr || !type)
|
if (!name || !len || !addr || !type)
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (sysctl(mib, 6, NULL, &len, NULL, 0) < 0)
|
if (sysctl(mib, 6, NULL, &mibLen, NULL, 0) < 0)
|
||||||
return ERROR_NO_MORE_FILES;
|
return ERROR_NO_MORE_FILES;
|
||||||
|
|
||||||
buf = (u_char *)malloc(mibLen);
|
buf = (u_char *)malloc(mibLen);
|
||||||
|
|
Loading…
Reference in New Issue