diff options
author | le <le@FreeBSD.org> | 2004-07-24 19:11:40 +0000 |
---|---|---|
committer | le <le@FreeBSD.org> | 2004-07-24 19:11:40 +0000 |
commit | fca95b696edc3d1a61a7be1a59769f70697d5501 (patch) | |
tree | ef0f4395dea3f4adfe43e02b8dc3c561deab1389 | |
parent | 64d6caaef25a74200ed0bfdba093ebc496d90755 (diff) | |
download | FreeBSD-src-fca95b696edc3d1a61a7be1a59769f70697d5501.zip FreeBSD-src-fca95b696edc3d1a61a7be1a59769f70697d5501.tar.gz |
Fix potential buffer overflow.
PR: bin/14697
Submitted by: Matthew <kienow@infinet.com>
-rw-r--r-- | sbin/vinum/commands.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/vinum/commands.c b/sbin/vinum/commands.c index f333954..c0038e4 100644 --- a/sbin/vinum/commands.c +++ b/sbin/vinum/commands.c @@ -153,8 +153,8 @@ vinum_read(int argc, char *argv[], char *arg0[]) buffer[0] = '\0'; /* make sure we don't pass anything */ if (argc > 0) { /* args specified, */ for (i = 0; i < argc; i++) { /* each drive name */ - strcat(buffer, argv[i]); - strcat(buffer, " "); + strlcat(buffer, argv[i], sizeof(buffer)); + strlcat(buffer, " ", sizeof(buffer)); } } ioctl(superdev, VINUM_READCONFIG, &buffer); |