From: Halesh S <halesh.s@india.com>
To: linux-kernel@vger.kernel.org
Subject: Re: execve errno setting on MIPS
Date: Thu, 18 Sep 2008 05:34:00 +0000 (UTC) [thread overview]
Message-ID: <loom.20080918T052854-761@post.gmane.org> (raw)
In-Reply-To: <48D1DF43.4090804@davidnewall.com>
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
prev parent reply other threads:[~2008-09-18 5:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-18 4:33 execve exit status " Halesh S
2008-09-18 4:55 ` David Newall
2008-09-18 5:34 ` Halesh S [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20080918T052854-761@post.gmane.org \
--to=halesh.s@india.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®