Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Oct 2000 23:40:46 -0400 (EDT)
From:      Mike Heffner <mheffner@vt.edu>
To:        FreeBSD-audit <FreeBSD-audit@freebsd.org>
Subject:   Small fix for usbhidctl
Message-ID:  <XFMail.20001008234046.mheffner@vt.edu>

next in thread | raw e-mail | index | archive | help
Fixes command line overflow.


--- usbhid.c.orig       Sun Oct  8 22:04:53 2000
+++ usbhid.c    Sun Oct  8 22:23:49 2000
@@ -311,9 +311,9 @@
 
        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;
        }
 


-- 
  Mike Heffner     <mheffner@vt.edu>
  Fredericksburg, VA     ICQ# 882073
  http://my.ispchannel.com/~mheffner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20001008234046.mheffner>