diff options
author | jp161948 <none@none> | 2006-09-21 03:40:40 -0700 |
---|---|---|
committer | jp161948 <none@none> | 2006-09-21 03:40:40 -0700 |
commit | a7e50fb1b1efb03c4582e9def5064f66f601bcfe (patch) | |
tree | 49f2405094865240d67e651755d50fa81792de33 /usr/src/cmd/ssh/libssh/common/misc.c | |
parent | 8c12346d58d650f053c34f764af201375e89cbc6 (diff) | |
download | illumos-joyent-a7e50fb1b1efb03c4582e9def5064f66f601bcfe.tar.gz |
6472377 use of system() can cause execution of arbitrary code through malformed filenames (CVE-2006-0225)
Diffstat (limited to 'usr/src/cmd/ssh/libssh/common/misc.c')
-rw-r--r-- | usr/src/cmd/ssh/libssh/common/misc.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/usr/src/cmd/ssh/libssh/common/misc.c b/usr/src/cmd/ssh/libssh/common/misc.c index 5c4de6102d..33454826f2 100644 --- a/usr/src/cmd/ssh/libssh/common/misc.c +++ b/usr/src/cmd/ssh/libssh/common/misc.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -354,6 +354,20 @@ addargs(arglist *args, char *fmt, ...) args->list[args->num] = NULL; } +void +freeargs(arglist *args) +{ + u_int i; + + if (args->list != NULL) { + for (i = 0; i < args->num; i++) + xfree(args->list[i]); + xfree(args->list); + args->nalloc = args->num = 0; + args->list = NULL; + } +} + mysig_t mysignal(int sig, mysig_t act) { |