diff options
author | erik.sjolund@gmail.com <erik.sjolund@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 15:52:32 +0000 |
---|---|---|
committer | erik.sjolund@gmail.com <erik.sjolund@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 15:52:32 +0000 |
commit | 1645c556c53954f475e709140f0a4315841dd99b (patch) | |
tree | 35117f0fcf2547072a88ab5129c90a390e2e1e57 /sandbox | |
parent | 5458b02259e5f3ec2411225073d47ab6fadb0348 (diff) | |
download | chromium_src-1645c556c53954f475e709140f0a4315841dd99b.zip chromium_src-1645c556c53954f475e709140f0a4315841dd99b.tar.gz chromium_src-1645c556c53954f475e709140f0a4315841dd99b.tar.bz2 |
Better check if argc is 0 because argv[0] is later used.
Review URL: http://codereview.chromium.org/10093005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/linux/suid/sandbox.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sandbox/linux/suid/sandbox.c b/sandbox/linux/suid/sandbox.c index 475378c..a83291e 100644 --- a/sandbox/linux/suid/sandbox.c +++ b/sandbox/linux/suid/sandbox.c @@ -381,6 +381,10 @@ static bool SetupChildEnvironment() { int main(int argc, char **argv) { if (argc <= 1) { + if (argc == 0) { + return 1; + } + fprintf(stderr, "Usage: %s <renderer process> <args...>\n", argv[0]); return 1; } |