[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/icecream/icecream/daemon [POSSIBLY UNSAFE]
From: Michael Matz <matz () kde ! org>
Date: 2004-08-12 15:48:38
Message-ID: 20040812154838.103649A7F () office ! kde ! org
[Download RAW message or body]
CVS commit by matz:
Ensure an invariant which bit us.
M +3 -1 workit.cpp 1.28 [POSSIBLY UNSAFE: printf]
--- kdenonbeta/icecream/icecream/daemon/workit.cpp #1.27:1.28
@@ -174,5 +174,5 @@ int work_it( CompileJob &j,
int argc = list.size();
argc++; // the program
- argc += 4; // file.i -o file.o
+ argc += 3; // file.i -o file.o
argc += 4; // gpc parameters
char **argv = new char*[argc + 1];
@@ -202,4 +202,6 @@ int work_it( CompileJob &j,
// before you add new args, check above for argc
argv[i] = 0;
+ if (i > argc)
+ printf ("Ohh bummer. You can't count.\n");
#if 0
printf( "forking " );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic