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:
parent
0f313d1cb8
commit
facb50dfde
1 changed files with 2 additions and 2 deletions
|
@ -568,8 +568,8 @@ _DtDtsMMCacheName(int override)
|
||||||
/* unique file name instead. */
|
/* unique file name instead. */
|
||||||
char tmpnam_buf[L_tmpnam + 1];
|
char tmpnam_buf[L_tmpnam + 1];
|
||||||
|
|
||||||
results = (char *)malloc(sizeof(_DTDTSMMTEMPDIR) +
|
results = (char *)malloc(strlen(_DTDTSMMTEMPDIR) +
|
||||||
sizeof(_DTDTSMMTEMPFILE) +
|
strlen(_DTDTSMMTEMPFILE) +
|
||||||
L_tmpnam + 3);
|
L_tmpnam + 3);
|
||||||
tmpnam(tmpnam_buf);
|
tmpnam(tmpnam_buf);
|
||||||
sprintf(results, "%s/%s%s", _DTDTSMMTEMPDIR, _DTDTSMMTEMPFILE,
|
sprintf(results, "%s/%s%s", _DTDTSMMTEMPDIR, _DTDTSMMTEMPFILE,
|
||||||
|
|
Loading…
Reference in a new issue