summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorle <le@FreeBSD.org>2004-07-24 19:11:40 +0000
committerle <le@FreeBSD.org>2004-07-24 19:11:40 +0000
commitfca95b696edc3d1a61a7be1a59769f70697d5501 (patch)
treeef0f4395dea3f4adfe43e02b8dc3c561deab1389 /sbin
parent64d6caaef25a74200ed0bfdba093ebc496d90755 (diff)
downloadFreeBSD-src-fca95b696edc3d1a61a7be1a59769f70697d5501.zip
FreeBSD-src-fca95b696edc3d1a61a7be1a59769f70697d5501.tar.gz
Fix potential buffer overflow.
PR: bin/14697 Submitted by: Matthew <kienow@infinet.com>
Diffstat (limited to 'sbin')
-rw-r--r--sbin/vinum/commands.c4
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);
OpenPOWER on IntegriCloud