[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <loom.20080918T052854-761@post.gmane.org>
Date: Thu, 18 Sep 2008 05:34:00 +0000 (UTC)
From: Halesh S <halesh.s@...ia.com>
To: linux-kernel@...r.kernel.org
Subject: Re: execve errno setting on MIPS
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists