mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Don't overflow in command-line args
Submitted by: Mike Heffner <mheffner@vt.edu>
This commit is contained in:
parent
e4a85a9b14
commit
b2338d532a
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue