diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-12-18 02:56:23 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-12-18 02:56:23 +0000 |
commit | 989be6a639a68db42a57830514907757975da7b7 (patch) | |
tree | 2bd0f8057ed90aaefcad9d1ac9499e499e217c15 /ace | |
parent | e15f26bd27d633880015faa37001810729272493 (diff) | |
download | ATCD-989be6a639a68db42a57830514907757975da7b7.tar.gz |
in ::spa () for VxWorks, zero out unused argv[] slots to overwrite args from previous invocations
Diffstat (limited to 'ace')
-rw-r--r-- | ace/OS.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ace/OS.cpp b/ace/OS.cpp index f79760c1762..583430de95d 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -1430,6 +1430,15 @@ spa (FUNCPTR entry, ...) fprintf (stderr, "spa(): number of arguments limited to %d\n", MAX_ARGS); } + else + { + // fill unused argv slots with 0 to get rid of leftovers + // from previous invocations + for ( ; argc <= MAX_ARGS; ++argc) + { + argv[argc] = 0; + } + } int ret = ::sp (entry, argc, (int) argv, 0, 0, 0, 0, 0, 0, 0); va_end (pvar); |