From e0d8aaa0ddd7bf72d2fbeafbb5d94c74cafb19b7 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Mon, 2 Jul 2018 20:58:16 +0100 Subject: [PATCH] dtwm: Coverity 88535 --- cde/programs/dtwm/WmImage.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); } -- 2.25.1