From 94fe4232d00189c225b4fd1ec4dded9c3f7ee559 Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Windows 11)" <rob@synchro.net>
Date: Wed, 22 Nov 2023 15:00:35 -0800
Subject: [PATCH] Fix CID 469138

getkeys() is actually never (currently) called with a NULL arg, so this
could not actually occur, but better to prepare for that eventuality.

This looks like a case of not following the YAGNI principle.
---
 src/sbbs3/getkey.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sbbs3/getkey.cpp b/src/sbbs3/getkey.cpp
index fef142eb83..b26f5a1ee0 100644
--- a/src/sbbs3/getkey.cpp
+++ b/src/sbbs3/getkey.cpp
@@ -332,7 +332,7 @@ bool sbbs_t::noyes(const char *str, int mode)
 /****************************************************************************/
 int sbbs_t::getkeys(const char *keys, uint max, int mode)
 {
-	char	str[81];
+	char	str[81]{};
 	uchar	ch,n=0,c=0;
 	uint	i=0;
 
-- 
GitLab