Repository navigation
Commit f4be095
SetConfigValue: Don't crash when clearing connection user data
Passing NULL to SetConfigValue for k_ESteamNetworkingConfig_ConnectionUserData
at connection scope took the user data special case, which converted the value
with AssignConfigValueTyped() and dereferenced the NULL pointer. The check in
SetConfigValueTyped() that rejects clearing connection user data was never
reached.
Let NULL fall through to SetConfigValueTyped(), so the call fails with "Cannot
clear connection user data" instead of crashing, and add a check for it to the
pipe test.1 parent 7441f73 commit f4be095
2 files changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2220 | 2220 | | |
2221 | 2221 | | |
2222 | 2222 | | |
2223 | | - | |
2224 | | - | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
2225 | 2226 | | |
2226 | 2227 | | |
2227 | 2228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1227 | 1227 | | |
1228 | 1228 | | |
1229 | 1229 | | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
1230 | 1233 | | |
1231 | 1234 | | |
1232 | 1235 | | |
| |||
0 commit comments