kernel: fix args crossing page boundaries in sysexec
Should also fix CID 155615 (Operands don't affect result)
This commit is contained in:
parent
df8bc2ce43
commit
180da90a06
@ -400,7 +400,7 @@ sysexec(char* p, char **argv)
|
||||
argsize += sizeof(uintptr_t); /* place for argc = nil */
|
||||
|
||||
tmp = up->seg[ESEG]->top - argsize;
|
||||
if(tmp&~(PGSZ-1) != (tmp+sizeof(uintptr_t)+sizeof(char*)*(argc+1))&~(PGSZ-1)){
|
||||
if((tmp&~(PGSZ-1)) != ((tmp+sizeof(uintptr_t)+sizeof(char*)*(argc+1))&~(PGSZ-1))){
|
||||
/* the argument pointers cross a page boundary, keep
|
||||
* them all in the same page
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user