1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

DtSvc: Fixes a segfault on Debian squeeze 64 bit and most probably other systems, too.

Patch from Marc Balmer <marc@msys.ch>:

Use strlen, not sizeof, here.  Fixes a segfault on Debian squeeze 64 bit
and most probably other systems, too.
This commit is contained in:
Jon Trulson 2012-08-08 12:45:40 -06:00
parent 0f313d1cb8
commit facb50dfde

View file

@ -568,8 +568,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,