diff options
author | sn199410 <none@none> | 2006-08-22 10:36:18 -0700 |
---|---|---|
committer | sn199410 <none@none> | 2006-08-22 10:36:18 -0700 |
commit | 94e1761e7fc32a474e3106beedc664ce987b96ec (patch) | |
tree | b0283c8dc4442c8af371c20ab4a1d37ffa02cebd /usr/src/cmd/tip/cmds.c | |
parent | a1e4d62bc1ea0bd683c63f185da43cda7aec8f20 (diff) | |
download | illumos-joyent-94e1761e7fc32a474e3106beedc664ce987b96ec.tar.gz |
4706048 *tip* cmds.c,uucplock.c,tipout.c use unsafe creat,fopen
Diffstat (limited to 'usr/src/cmd/tip/cmds.c')
-rw-r--r-- | usr/src/cmd/tip/cmds.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr/src/cmd/tip/cmds.c b/usr/src/cmd/tip/cmds.c index d4ae2d66e4..bc3c6c59d3 100644 --- a/usr/src/cmd/tip/cmds.c +++ b/usr/src/cmd/tip/cmds.c @@ -1,5 +1,5 @@ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -12,6 +12,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include "tip.h" +#include <limits.h> #ifdef USG #include <unistd.h> #else @@ -604,6 +605,11 @@ void setscript(void) { char c; + + if (strlen(value(RECORD)) >= PATH_MAX-1) { + (void) fprintf(stderr, "tip: record file name too long\r\n"); + return; + } /* * enable TIPOUT side for dialogue */ |