From: Peter Howkins Date: Mon, 2 Jul 2018 19:58:16 +0000 (+0100) Subject: dtwm: Coverity 88535 X-Git-Tag: 2.3.0a~260 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e0d8aaa0ddd7bf72d2fbeafbb5d94c74cafb19b7;p=oweals%2Fcde.git dtwm: Coverity 88535 --- diff --git a/cde/programs/dtwm/WmImage.c b/cde/programs/dtwm/WmImage.c index 0c043572..ab98c03f 100644 --- a/cde/programs/dtwm/WmImage.c +++ b/cde/programs/dtwm/WmImage.c @@ -989,8 +989,7 @@ char *BitmapPathName (char *string) * Handle "~/.." */ { - strcpy (fileName, homeDir); - strncat (fileName, &(string[1]), MAXWMPATH - strlen (fileName)); + snprintf(fileName, MAXWMPATH, "%s%s", homeDir, &(string[1])); return (fileName); }