Fix modify_stack_protector flake
The previous test would fail to crash if the first byte of the canary was
already NUL (1 of 256 runs assuming uniform canary distribution).
Bug: http://b/121156651
Test: bionic unit tests
diff --git a/tests/stack_protector_test_helper.cpp b/tests/stack_protector_test_helper.cpp
index 3f15a12..2db4ef1 100644
--- a/tests/stack_protector_test_helper.cpp
+++ b/tests/stack_protector_test_helper.cpp
@@ -21,6 +21,6 @@
// the line of defense *after* that.
// Without volatile, the generic x86/x86-64 targets don't write to the stack.
volatile char* p = buf;
- int size = static_cast<int>(sizeof(buf) + 1);
+ int size = static_cast<int>(sizeof(buf) + sizeof(void*));
while ((p - buf) < size) *p++ = '\0';
}