Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: sandbox/linux/suid/sandbox.c

Issue 10093005: Better check if argc is 0 because argv[0] is later used. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/suid/sandbox.c
===================================================================
--- sandbox/linux/suid/sandbox.c (revision 132361)
+++ sandbox/linux/suid/sandbox.c (working copy)
@@ -381,6 +381,10 @@
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;
}
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698