On Wed, 8 Aug 2012, Marc Balmer wrote: > 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, >
error: patch failed: cde/lib/DtSvc/DtUtil1/DtsMM.c:567 error: cde/lib/DtSvc/DtUtil1/DtsMM.c: patch does not apply I will apply manually, however in the future, please send patches as attachment, and base it off of current master HEAD, as there have already been other commits to this file. :) Also, this code is using tmpnam, might want to use mkstemp like a patch that was made earlier to cde/lib/DtSvc/DtUtil1/MMDb.c Oh, and thanks for the fix :) -- Jon Trulson "If the Martian rope-a-dope don't get him, he'll get himself, he'll come in too fast and punch himself out." - one of my brothers, referring to the Curiosity landing. ------------------------------------------------------------------------------ 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