]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commit
PRVM: fix incorrect tempstring length in VM_tokenizebyseparator()
authorbones_was_here <bones_was_here@xonotic.au>
Tue, 23 Jul 2024 15:35:18 +0000 (01:35 +1000)
committerDes <xon@damianv.com.ar>
Mon, 5 Aug 2024 11:59:14 +0000 (08:59 -0300)
commit48db9fceb9aac299e6af7e0936f438f094523a2f
tree2df882a2aea5118305c2b0c4a6cf156ac2ebc930
parent5810b5bfa8cb146a1412d944d375e9d6cc16834a
PRVM: fix incorrect tempstring length in VM_tokenizebyseparator()

This caused memcpy() in PRVM_SetTempString() to copy too many bytes,
when the source string had the maximum length it could read past the end
and trigger a segfault.
Bug was introduced in 26a665ff43052862131df3c63785f91861989fc8 and looks
to be specific to that builtin.

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
prvm_cmds.c