summaryrefslogtreecommitdiff
path: root/netwerk/system/mac/nsNetworkLinkService.mm
diff options
context:
space:
mode:
Diffstat (limited to 'netwerk/system/mac/nsNetworkLinkService.mm')
-rw-r--r--netwerk/system/mac/nsNetworkLinkService.mm6
1 files changed, 4 insertions, 2 deletions
diff --git a/netwerk/system/mac/nsNetworkLinkService.mm b/netwerk/system/mac/nsNetworkLinkService.mm
index 5b2d7575ac..30942331d1 100644
--- a/netwerk/system/mac/nsNetworkLinkService.mm
+++ b/netwerk/system/mac/nsNetworkLinkService.mm
@@ -181,11 +181,13 @@ static bool scanArp(char *ip, char *mac, size_t maclen)
if (st == 0 || errno != ENOMEM) {
break;
}
- needed += needed / 8;
+ size_t increased = needed;
+ increased += increased / 8;
- auto tmp = MakeUnique<char[]>(needed);
+ auto tmp = MakeUnique<char[]>(increased);
memcpy(&tmp[0], &buf[0], needed);
buf = Move(tmp);
+ needed = increased;
}
if (st == -1) {
return false;