1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

dtscreen: Coverity (memory corruption, moderate)

This commit is contained in:
Jon Trulson 2014-12-26 17:17:58 -07:00
parent a5c7512782
commit 055d98cafb

View file

@ -623,9 +623,9 @@ GetResources(argc, argv)
if (!userpath) { if (!userpath) {
env = getenv("XAPPLRESDIR"); env = getenv("XAPPLRESDIR");
if (env) if (env)
sprintf(userfile, "%s/%%N:%s/%%N", env, homeenv); snprintf(userfile, 1024 - 1, "%s/%%N:%s/%%N", env, homeenv);
else else
sprintf(userfile, "%s/%%N", homeenv); snprintf(userfile, 1024 - 1, "%s/%%N", homeenv);
userpath = userfile; userpath = userfile;
} }
userDB = parsefilepath(userpath, "app-defaults", classname); userDB = parsefilepath(userpath, "app-defaults", classname);