Re: "Key binding failed?!--More--"; Strcat to an empty character buffer, causing garbage

This is intended to resolve GitHub Issue #1650, which I was unable to directly reproduce
on my test system.

This fix assumes that the reported issue was related to cmdstr[BUFSZ] buffer not
getting initialized, thus containing random memory values.
This commit is contained in:
nhmall
2026-08-06 10:22:24 -04:00
parent 15cfe90d62
commit c3ce341434
+1
View File
@@ -2355,6 +2355,7 @@ handler_rebind_keys_add(boolean keyfirst)
struct Cmd_bind *prevcmd;
char cmdstr[BUFSZ];
cmdstr[0] = '\0';
i = picks->item.a_int;
free((genericptr_t) picks);