-
Notifications
You must be signed in to change notification settings - Fork 677
Description
Not related to #1730 apart from that it also happens in the command menu.
There have been reports by French and German TFC players experiencing a crash when trying to join a server, with the proposed work-around being to delete the language specific tfc folder ("tfc_french" or "tfc_german") or to change language to English. I was able to reproduce the crash and find out what's causing it.
There is a bug in the current version of TFC which causes it to crash if a menu item is longer than 31 characters. The old version of TFC (steam_legacy) is not affected. The problem probably exists since the October 2024 changes to the client DLL in depot 21 (TFC Base Content).
Work-arounds:
- french_commandmenu.diff.txt
- [HL][TFC] Crash while parsing command menu (menu item length) #3956 (comment)
I removed the single quotes to fit more letters into the maximum of 31 characters. The command string can be longer.
Test case 1
"8" "You finish building the dispenser." "say OK"
A buffer overflow occurs if the original string is too long in the button text.
Test case 2
"8" "#Dispenser_finish" "say OK"
A buffer overflow occurs if the substituted string is too long in the button text.
These are triggered in two different code segments of "CHudTextMessage::LocaliseTextString" in "cl_dll/text_message.cpp".
Proposed bug fix for the client DLL: #3956 (comment)