summaryrefslogtreecommitdiff
path: root/tests/stack_protector_test_helper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stack_protector_test_helper.cpp')
-rw-r--r--tests/stack_protector_test_helper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/stack_protector_test_helper.cpp b/tests/stack_protector_test_helper.cpp
index 3f15a123f..2db4ef142 100644
--- a/tests/stack_protector_test_helper.cpp
+++ b/tests/stack_protector_test_helper.cpp
@@ -21,6 +21,6 @@ __attribute__((noinline)) void modify_stack_protector_test() {
// 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';
}