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 | |
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
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | sandbox/linux/suid/sandbox.c | 4 |
2 files changed, 5 insertions, 0 deletions
@@ -174,3 +174,4 @@ Arun Mankuzhi <arun.m@samsung.com> Taylor Price <trprice@gmail.com> Alexandru Chiculita <achicu@adobe.com> Eric Rescorla <ekr@rtfm.com> +Erik Sjölund <erik.sjolund@gmail.com> 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; } |