From 055d98cafbc84c111918618e689dd586336d7673 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Fri, 26 Dec 2014 17:17:58 -0700 Subject: [PATCH] dtscreen: Coverity (memory corruption, moderate) --- cde/programs/dtscreen/resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cde/programs/dtscreen/resource.c b/cde/programs/dtscreen/resource.c index 685207bd..c48ef550 100644 --- a/cde/programs/dtscreen/resource.c +++ b/cde/programs/dtscreen/resource.c @@ -623,9 +623,9 @@ GetResources(argc, argv) if (!userpath) { env = getenv("XAPPLRESDIR"); if (env) - sprintf(userfile, "%s/%%N:%s/%%N", env, homeenv); + snprintf(userfile, 1024 - 1, "%s/%%N:%s/%%N", env, homeenv); else - sprintf(userfile, "%s/%%N", homeenv); + snprintf(userfile, 1024 - 1, "%s/%%N", homeenv); userpath = userfile; } userDB = parsefilepath(userpath, "app-defaults", classname); -- 2.25.1