summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2021-07-28 22:55:17 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2021-07-28 22:55:17 +0000
commit84b77568cda98a21dd4f3403a94c56724fbd5b37 (patch)
tree442582279f97bf275768a2ce2d696d26b08c701e
parent37f5069426233b32403d0af5dba37f5400e030b7 (diff)
downloadplan9front-84b77568cda98a21dd4f3403a94c56724fbd5b37.tar.xz
kernel: fix off by one for $cputype buffer (thanks anthony martin)
-rw-r--r--sys/src/9/boot/boot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/boot/boot.c b/sys/src/9/boot/boot.c
index a8e08f91a..51daee7a0 100644
--- a/sys/src/9/boot/boot.c
+++ b/sys/src/9/boot/boot.c
@@ -22,7 +22,7 @@ main(int, char *argv[])
bind(root, "/", MAFTER);
buf[0] = '/';
- buf[1+read(open("/env/cputype", OREAD|OCEXEC), buf+1, sizeof buf - 5)] = '\0';
+ buf[1+read(open("/env/cputype", OREAD|OCEXEC), buf+1, sizeof buf - 6)] = '\0';
strcat(buf, bin);
bind(buf, bin, MAFTER);
bind("/rc/bin", bin, MAFTER);