diff options
author | kris <kris@FreeBSD.org> | 2000-10-09 05:44:39 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2000-10-09 05:44:39 +0000 |
commit | fa43aea9dc832ed13b413a962469fc8df6909208 (patch) | |
tree | 3fcec4e6b51e0f627c817f78c85882d49c217507 /usr.bin | |
parent | e61ab07a16a7feaf46bd87862125573ddfba1be1 (diff) | |
download | FreeBSD-src-fa43aea9dc832ed13b413a962469fc8df6909208.zip FreeBSD-src-fa43aea9dc832ed13b413a962469fc8df6909208.tar.gz |
Don't overflow in command-line args
Submitted by: Mike Heffner <mheffner@vt.edu>
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/usbhidctl/usbhid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/usbhidctl/usbhid.c b/usr.bin/usbhidctl/usbhid.c index 4518ff8..8dd1e5f 100644 --- a/usr.bin/usbhidctl/usbhid.c +++ b/usr.bin/usbhidctl/usbhid.c @@ -311,9 +311,9 @@ main(int argc, char **argv) if (dev[0] != '/') { if (isdigit(dev[0])) - sprintf(devname, "/dev/uhid%s", dev); + snprintf(devname, sizeof(devname), "/dev/uhid%s", dev); else - sprintf(devname, "/dev/%s", dev); + snprintf(devname, sizeof(devname), "/dev/%s", dev); dev = devname; } |