summaryrefslogtreecommitdiff
path: root/src/hexen
diff options
context:
space:
mode:
authorSimon Howard2014-11-04 01:00:12 -0500
committerSimon Howard2014-11-04 01:00:12 -0500
commit66b295d461789f204d19b7181b1a11804a666728 (patch)
tree084ac6667e87974938c0802b4fa1a598a2eef1ca /src/hexen
parent176050dcb3b595b8f4e6ab270e44261e766f9528 (diff)
downloadchocolate-doom-66b295d461789f204d19b7181b1a11804a666728.tar.gz
chocolate-doom-66b295d461789f204d19b7181b1a11804a666728.tar.bz2
chocolate-doom-66b295d461789f204d19b7181b1a11804a666728.zip
setup: Fix bug with strdup() of NULL pointer.
getenv() can return NULL if the environment variable is not set, but the result of getenv() was always being passed to M_StringDuplicate() without any check. This could cause crashes on some platforms. Instead, rework the code into a first stage that gets the player's name and a second that duplicates it into a mutable form. This fixes #455.
Diffstat (limited to 'src/hexen')
0 files changed, 0 insertions, 0 deletions