summaryrefslogtreecommitdiffstats
path: root/sandbox/src/ipc_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/src/ipc_unittest.cc')
-rw-r--r--sandbox/src/ipc_unittest.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/sandbox/src/ipc_unittest.cc b/sandbox/src/ipc_unittest.cc
index 909f144..7686242 100644
--- a/sandbox/src/ipc_unittest.cc
+++ b/sandbox/src/ipc_unittest.cc
@@ -332,6 +332,23 @@ TEST(IPCTest, CrossCallValidation) {
EXPECT_TRUE(NULL == ccp);
}
#endif // defined(NDEBUG)
+
+ ActualCallParams<1, 256> params_3(kTag, 1);
+ params_3.CopyParamIn(0, &value, sizeof(value), false, ULONG_TYPE);
+ buffer = const_cast<void*>(params_3.GetBuffer());
+ EXPECT_TRUE(NULL != buffer);
+
+ size_t correct_size = params_3.OverrideSize(1);
+ ccp = CrossCallParamsEx::CreateFromBuffer(buffer, 256, &out_size);
+ EXPECT_TRUE(NULL == ccp);
+
+ params_3.OverrideSize(correct_size - 4);
+ ccp = CrossCallParamsEx::CreateFromBuffer(buffer, 256, &out_size);
+ EXPECT_TRUE(NULL == ccp);
+
+ params_3.OverrideSize(correct_size);
+ ccp = CrossCallParamsEx::CreateFromBuffer(buffer, 256, &out_size);
+ EXPECT_TRUE(NULL != ccp);
}
// This structure is passed to the mock server threads to simulate