Use strlen, not sizeof, here. Fixes a segfault on Debian squeeze 64 bit and most probably other systems, too.
(If the mailer mangles the diff, I can resend it as attachment) diff --git a/cde/lib/DtSvc/DtUtil1/DtsMM.c b/cde/lib/DtSvc/DtUtil1/DtsMM.c index dd82d6f..0004afa 100644 --- a/cde/lib/DtSvc/DtUtil1/DtsMM.c +++ b/cde/lib/DtSvc/DtUtil1/DtsMM.c @@ -567,8 +567,8 @@ _DtDtsMMCacheName(int override) /* unique file name instead. */ char tmpnam_buf[L_tmpnam + 1]; - results = (char *)malloc(sizeof(_DTDTSMMTEMPDIR) + - sizeof(_DTDTSMMTEMPFILE) + + results = (char *)malloc(strlen(_DTDTSMMTEMPDIR) + + strlen(_DTDTSMMTEMPFILE) + L_tmpnam + 3); tmpnam(tmpnam_buf); sprintf(results, "%s/%s%s", _DTDTSMMTEMPDIR, _DTDTSMMTEMPFILE, ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ cdesktopenv-devel mailing list cdesktopenv-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel