diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2002-05-27 04:59:46 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2002-05-27 04:59:46 +0000 |
| commit | 3f5869d0b05367d93cf1523c05f6ddbf1e78f845 (patch) | |
| tree | 070e2ce6bff890070b9bde46928e39eeeff487b2 /usr.bin/split/split.c | |
| parent | 880ff11350c02ccea432c27842eb6c29578e3d76 (diff) | |
Notes
Diffstat (limited to 'usr.bin/split/split.c')
| -rw-r--r-- | usr.bin/split/split.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c index 5d7ed13bbb56..9eb56a172201 100644 --- a/usr.bin/split/split.c +++ b/usr.bin/split/split.c @@ -147,7 +147,8 @@ main(argc, argv) ++argv; } if (*argv != NULL) /* File name prefix. */ - (void)strcpy(fname, *argv++); + if (strlcpy(fname, *argv++, sizeof(fname)) >= sizeof(fname)) + errx(EX_USAGE, "file name prefix is too long"); if (*argv != NULL) usage(); |
