You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you pass an empty size MatchMakingKeyValuePair_t[] array (instead of null) to any of the RequestXYZList methods in SteamMatchmakingServers, it will cause heap corruption.
Why: it will allocate a zero-size block of memory using Marshal.AllocHGlobal. I'm sure the actual returned size isn't zero, because it returns a valid pointer, but the problem is it writes 8 bytes onto this. When it gets freed it causes a heap corruption error.
Solution: Simply check if the array is empty, and do not allocate anything if that's the case.
The text was updated successfully, but these errors were encountered:
If you pass an empty size
MatchMakingKeyValuePair_t[]
array (instead of null) to any of the RequestXYZList methods inSteamMatchmakingServers
, it will cause heap corruption.Why: it will allocate a zero-size block of memory using
Marshal.AllocHGlobal
. I'm sure the actual returned size isn't zero, because it returns a valid pointer, but the problem is it writes 8 bytes onto this. When it gets freed it causes a heap corruption error.Solution: Simply check if the array is empty, and do not allocate anything if that's the case.
The text was updated successfully, but these errors were encountered: