From c3ce34143489ee9b9004279d5f121eaaecbddc68 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 6 Aug 2026 10:22:24 -0400 Subject: [PATCH] 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. --- src/cmd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmd.c b/src/cmd.c index 6f67db776..efa0288a6 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -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);