summaryrefslogtreecommitdiff
path: root/sys/src/9/port/devether.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-02-25 17:11:18 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2018-02-25 17:11:18 +0100
commitb2d79920255fc405b972e4c900e47f4a1046e044 (patch)
treeb0ee1c462368b365880b6adb2fb8ea6b64b5336f /sys/src/9/port/devether.c
parentd3f4786a1fcfb3cf8eba0cad2457622c6487e0e9 (diff)
kernel: properly handle bad attach specifiers
- only accept decimal for numeric device id's - exclude negative device id's - device id's out of range yield Enodev
Diffstat (limited to 'sys/src/9/port/devether.c')
-rw-r--r--sys/src/9/port/devether.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/port/devether.c b/sys/src/9/port/devether.c
index abc56f325..bff515611 100644
--- a/sys/src/9/port/devether.c
+++ b/sys/src/9/port/devether.c
@@ -25,7 +25,7 @@ etherattach(char* spec)
ctlrno = 0;
if(*spec){
- ctlrno = strtoul(spec, &conf, 0);
+ ctlrno = strtoul(spec, &conf, 10);
if(ctlrno >= MaxEther)
error(Enodev);
if(conf == spec)