summaryrefslogtreecommitdiff
path: root/sys/src/9/port/devaoe.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2012-10-11 17:29:16 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2012-10-11 17:29:16 +0200
commit16d61d3c974b1d287db8d548cc13078341019730 (patch)
tree95bab330a7bee0b37bcf5d1495a76258969a2655 /sys/src/9/port/devaoe.c
parentd9394b0d87169ef7aa7796344af421c757bc3749 (diff)
kernel: try to catch some (rare) mistakes
kstrcpy() did not null terminate for < 4 byte buffers. fixed, but i dont think there is any case where this can happen in practice. always set malloctag in kstrdup(), cleanup. always use ERRMAX bounded kstrcpy() to set up->errstr, q->err and note[]->msg. paranoia. instead of silently truncating interface name in netifinit(), panic the kernel if interface name is too long as this case is clearly a mistake. panic kernel when filename is too long for addbootfile() in devroot. this might happen if your kernel configuration is messed up.
Diffstat (limited to 'sys/src/9/port/devaoe.c')
-rw-r--r--sys/src/9/port/devaoe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/port/devaoe.c b/sys/src/9/port/devaoe.c
index 23f621a05..0165558cc 100644
--- a/sys/src/9/port/devaoe.c
+++ b/sys/src/9/port/devaoe.c
@@ -2168,7 +2168,7 @@ static void
netrdaoeproc(void *v)
{
int idx;
- char name[Maxpath+1], *s;
+ char name[Maxpath], *s;
Aoehdr *h;
Block *b;
Netlink *nl;