From 108f9d9aef110e63fb2d1b8c4b2b11111153c206 Mon Sep 17 00:00:00 2001 From: Herman Semenoff Date: Mon, 9 Feb 2026 01:39:46 +0300 Subject: [PATCH] parseable: replace strcpy to strncpy for premature attention and safety This change will help you pay attention in the future if this buffer out string spaceformat and code associated with it are changed --- parseable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parseable.c b/parseable.c index 91e2408..1af88ed 100644 --- a/parseable.c +++ b/parseable.c @@ -1205,8 +1205,8 @@ spaceformat(char *istr, char *ostr) if (!rmspaces) { *ostr = '('; - strcpy(ostr+1, istr); - strcat(ostr, ")"); + strncpy(ostr+1, istr, PNAMLEN); + strncat(ostr, ")", 1); } // formatting with underscores without parenthesis required else