changeset 693:cfe101f6f1f3

fixed snprintf statement (hrr....)
author thomask
date Sat, 01 Oct 2005 11:13:29 +0000
parents 11655b2d04c6
children 7441f25aa368
files dstress.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/dstress.c	Thu Sep 29 06:02:12 2005 +0000
+++ b/dstress.c	Sat Oct 01 11:13:29 2005 +0000
@@ -627,8 +627,9 @@
 	/* start working */
 	if(modus==COMPILE || modus==NOCOMPILE){
 		/* gen command */
-		buffer = malloc(strlen(compiler)+strlen(cmd_arg_case)+strlen(OBJ)
-			+strlen(case_file)+strlen(TLOG)+64);
+		bufferLen = strlen(compiler)+strlen(cmd_arg_case)
+			+strlen(OBJ)+strlen(case_file)+strlen(TLOG)+64;
+		buffer = malloc(bufferLen);
 		snprintf(buffer, bufferLen, "%s %s ", compiler, cmd_arg_case);
 
 		if(NULL==strstr(buffer, "-od")){