Messages in this thread | | | From | Halesh S <> | Subject | Re: execve errno setting on MIPS | Date | Thu, 18 Sep 2008 05:34:00 +0000 (UTC) |
| |
I will change the Subject line "execve exit status on MIPS" first.
David Newall <davidn <at> davidnewall.com> writes: > > Halesh S wrote: > > char e2BIG[ARG_MAX+1][10]; > > ... > > for(ind = 0; ind < ARG_MAX+1; ind++) > > strcpy(e2BIG[ind], "helloworld"); > > > > Did you intend to overflow e2BIG? You're copying 11 bytes (including > terminating NUL) into a 10 byte array. >
My intenstion is not to overflow in string... We can change > > strcpy(e2BIG[ind], "helloworld"); to strcpy(e2BIG[ind], "helloworl");
But intenstion is to generate E2BIG in if ((ret = execve(EXE_NAME,e2BIG,envList)) == -1) {
where e2BIG array has more number arguments than ARG_MAX.
Which was possible on ARM,PPC and i386....
For the same code...I got 14 EFAULT....
Thanks, Halesh
| |