[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Use strdup in dd to avoid changing argv elements
From: |
Eric Blake |
Subject: |
Re: [PATCH] Use strdup in dd to avoid changing argv elements |
Date: |
Mon, 28 Jan 2008 11:12:59 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Andreas Schwab on 1/28/2008 7:21 AM:
| I think you are mixing up something here. This statement is only
| related to the fact that a call to exec* must not modify any of the argv
| and envp strings, despite the difficulty of expressing that in the
| prototype. The C standard explicitly requires that the argv array
| contents are modifiable in the executed process.
Indeed, I stand corrected. C99 5.1.2.2.1 states:
"The parameters argc and argv and the strings pointed to by the argv array
shall be modifiable by the program, and retain their last-stored values
between program startup and program termination."
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHnhsq84KuGfSFAYARAsMJAKCMBfi0AoaKza3lPUeh7vyCsLoDcgCfdRS6
Bznltxp0voNN0imtVwDvPSI=
=ie0o
-----END PGP SIGNATURE-----
- [PATCH] Use strdup in dd to avoid changing argv elements, Adam Goode, 2008/01/28
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Jim Meyering, 2008/01/28
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Eric Blake, 2008/01/28
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Jim Meyering, 2008/01/28
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Andreas Schwab, 2008/01/28
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Paul Eggert, 2008/01/29
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Jim Meyering, 2008/01/30
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Paul Eggert, 2008/01/30
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Jim Meyering, 2008/01/31
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Andreas Schwab, 2008/01/28
- Re: [PATCH] Use strdup in dd to avoid changing argv elements,
Eric Blake <=