From: Peter Howkins Date: Mon, 30 Apr 2018 00:51:15 +0000 (+0100) Subject: dticon: Fix broken string length calculation X-Git-Tag: 2.2.4a~47 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cd5d24021340bc95eb4e0cc3c39ff276792ef422;p=oweals%2Fcde.git dticon: Fix broken string length calculation --- diff --git a/cde/programs/dticon/utils.c b/cde/programs/dticon/utils.c index 27aaee80..2f7cf266 100644 --- a/cde/programs/dticon/utils.c +++ b/cde/programs/dticon/utils.c @@ -2296,7 +2296,7 @@ SaveSession( void ) { tmpStr = GETSTR(16,24, "Couldn't save session to file"); tmpStr2 = (char *)XtMalloc(strlen(tmpStr) + strlen(path)+ 3); - snprintf(tmpStr2, sizeof(strlen(tmpStr) + strlen(path)+ 3), "%s: %s\n", tmpStr, path); + snprintf(tmpStr2, strlen(tmpStr) + strlen(path) + 3, "%s: %s\n", tmpStr, path); _DtSimpleErrnoError(progName, DtError, NULL, tmpStr2, NULL); XtFree(tmpStr2); XtFree ((char *)path);