From: Jon Trulson Date: Fri, 26 Dec 2014 23:19:23 +0000 (-0700) Subject: dtcalc: Coverity (memory corruption, moderate) X-Git-Tag: 2.2.3~72 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=00540cb375754c9006d31792724946495a30f755;p=oweals%2Fcde.git dtcalc: Coverity (memory corruption, moderate) --- diff --git a/cde/programs/dtcalc/ds_xlib.c b/cde/programs/dtcalc/ds_xlib.c index d01238bb..76261907 100644 --- a/cde/programs/dtcalc/ds_xlib.c +++ b/cde/programs/dtcalc/ds_xlib.c @@ -178,7 +178,7 @@ ds_load_resources(Display *display) if ((ptr = getenv("DTCALCDEF")) == NULL) { - SPRINTF(name, "%s/.dtcalcdef", home) ; + snprintf(name, MAXPATHLEN - 1, "%s/.dtcalcdef", home) ; db = XrmGetFileDatabase(name) ; } else db = XrmGetFileDatabase(ptr) ;