diff options
author | Brad King <brad.king@kitware.com> | 2004-07-13 21:33:23 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2004-07-13 21:33:23 (GMT) |
commit | b993cd7fba70747a52510eb9cd81e25b1202915d (patch) | |
tree | 10d227f58c0b1289c0b728bc55cb836d3ae19079 /Source/kwsys/testProcess.c | |
parent | 0437b776b6d2b1d954b9e2256f2cf3e56f450f9b (diff) | |
download | CMake-b993cd7fba70747a52510eb9cd81e25b1202915d.zip CMake-b993cd7fba70747a52510eb9cd81e25b1202915d.tar.gz CMake-b993cd7fba70747a52510eb9cd81e25b1202915d.tar.bz2 |
BUG: Fixed off-by-one error in test6 function.
Diffstat (limited to 'Source/kwsys/testProcess.c')
-rw-r--r-- | Source/kwsys/testProcess.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/kwsys/testProcess.c b/Source/kwsys/testProcess.c index 5000170..0a1f777 100644 --- a/Source/kwsys/testProcess.c +++ b/Source/kwsys/testProcess.c @@ -96,19 +96,18 @@ int test5(int argc, const char* argv[]) int test6(int argc, const char* argv[]) { int i; - char runaway[TEST6_SIZE+2]; + char runaway[TEST6_SIZE+1]; (void)argc; (void)argv; for(i=0;i < TEST6_SIZE;++i) { runaway[i] = '.'; } runaway[TEST6_SIZE] = '\n'; - runaway[TEST6_SIZE] = 0; /* Generate huge amounts of output to test killing. */ for(;;) { - fwrite(runaway, 1, TEST6_SIZE+2, stdout); + fwrite(runaway, 1, TEST6_SIZE+1, stdout); fflush(stdout); } return 0; |