Fix stack overflow in BsdIPGlobalProperties (#43294)
authormafo23 <7200437+mafo23@users.noreply.github.com>
Tue, 13 Oct 2020 16:24:43 +0000 (03:24 +1100)
committerGitHub <noreply@github.com>
Tue, 13 Oct 2020 16:24:43 +0000 (09:24 -0700)
commit1eebfe42d0a6fbb66e759e797f99e6b49284bbfa
treea531a5338bc6278a770c61a1d5fa27e550723d47
parentd0b65a851691783c7552f11422e60b8ebd4f1cb1
Fix stack overflow in BsdIPGlobalProperties (#43294)

Both the GetTcpConnections and GetActiveUdpListeners functions were
using stackalloc on unbounded arrays. As the objects in these arrays
are quite large, removed the stackalloc so the arrays are always on
the heap.

Fix #43286
src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIPGlobalProperties.cs