summaryrefslogtreecommitdiffstats
path: root/sandbox/src
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-22 18:18:10 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-22 18:18:10 +0000
commit51cb4f57e5143cdf7c0a46ce86c6b3091f66e7f3 (patch)
tree76deff59c1ef85214a91ced7d2827c4b60542566 /sandbox/src
parent3938fb84c919708b142cf3ef7ed15dcf00ec1592 (diff)
downloadchromium_src-51cb4f57e5143cdf7c0a46ce86c6b3091f66e7f3.zip
chromium_src-51cb4f57e5143cdf7c0a46ce86c6b3091f66e7f3.tar.gz
chromium_src-51cb4f57e5143cdf7c0a46ce86c6b3091f66e7f3.tar.bz2
Fix FORWARD_NULL defects reported by Coverity. We should
also return an error if argv is NULL. R=rvargas BUG=http://crbug.com/17101 TEST=none Review URL: http://codereview.chromium.org/155904 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21292 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/src')
-rw-r--r--sandbox/src/named_pipe_policy_test.cc2
-rw-r--r--sandbox/src/process_policy_test.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/sandbox/src/named_pipe_policy_test.cc b/sandbox/src/named_pipe_policy_test.cc
index eea00ce..4378477 100644
--- a/sandbox/src/named_pipe_policy_test.cc
+++ b/sandbox/src/named_pipe_policy_test.cc
@@ -15,7 +15,7 @@ SBOX_TESTS_COMMAND int NamedPipe_Create(int argc, wchar_t **argv) {
if (argc != 1) {
return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND;
}
- if ((NULL != argv) && (NULL == argv[0])) {
+ if ((NULL == argv) || (NULL == argv[0])) {
return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND;
}
diff --git a/sandbox/src/process_policy_test.cc b/sandbox/src/process_policy_test.cc
index d9ea97f..e156cc5 100644
--- a/sandbox/src/process_policy_test.cc
+++ b/sandbox/src/process_policy_test.cc
@@ -99,7 +99,7 @@ SBOX_TESTS_COMMAND int Process_RunApp(int argc, wchar_t **argv) {
if (argc != 1) {
return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND;
}
- if ((NULL != argv) && (NULL == argv[0])) {
+ if ((NULL == argv) || (NULL == argv[0])) {
return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND;
}
std::wstring path = MakeFullPathToSystem32(argv[0]);
@@ -163,7 +163,7 @@ SBOX_TESTS_COMMAND int Process_GetChildProcessToken(int argc, wchar_t **argv) {
if (argc != 1)
return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND;
- if ((NULL != argv) && (NULL == argv[0]))
+ if ((NULL == argv) || (NULL == argv[0]))
return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND;
std::wstring path = MakeFullPathToSystem32(argv[0]);