kernel: fix off by one for $cputype buffer (thanks anthony martin)
This commit is contained in:
parent
37f5069426
commit
84b77568cd
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue