]> 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)
committerbones_was_here <bones_was_here@xonotic.au>
Tue, 23 Jul 2024 15:38:27 +0000 (01:38 +1000)
commitffc82878f0b92b5313b27a7a74e0fab91d8d8d25
tree83c2c207861c362287267507ffd035ad6d8db66d
parent9c29f2ace43f4b6c76b2d66ad3e0f265d30ea1c9
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