From 0bed8171f520b2b432114a795f60ab092e039125 Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 24 Feb 2006 16:00:23 +0000 Subject: [PATCH] sprintf into a buffer, not a random address git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4530 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/script.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/script.cpp b/Source/script.cpp index 6c138877..6fdcfbfd 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -2689,6 +2689,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) char *define=line.gettoken_str(1); char *value; char datebuf[256]; + char mathbuf[256]; bool date=false; if (!stricmp(define,"/date")) { @@ -2724,6 +2725,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) value1 = line.gettoken_int(3); mathop = line.gettoken_str(4); value2 = line.gettoken_int(5); + value = mathbuf; if (!strcmp(mathop,"+")) { sprintf(value,"%d",value1+value2);