aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/linux/dump_writer_common/seccomp_unwinder.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/linux/dump_writer_common/seccomp_unwinder.cc b/src/client/linux/dump_writer_common/seccomp_unwinder.cc
index 49971557..241bf1b0 100644
--- a/src/client/linux/dump_writer_common/seccomp_unwinder.cc
+++ b/src/client/linux/dump_writer_common/seccomp_unwinder.cc
@@ -44,8 +44,8 @@ void SeccompUnwinder::PopSeccompStackFrame(RawContextCPU* cpu,
uint64_t top = thread.stack.start_of_memory_range;
for (int i = 4; i--; ) {
if (bp < top ||
- bp + sizeof(bp) > thread.stack.start_of_memory_range +
- thread.stack.memory.data_size ||
+ bp > thread.stack.start_of_memory_range +
+ thread.stack.memory.data_size - sizeof(bp) ||
bp & 1) {
break;
}
@@ -107,8 +107,8 @@ void SeccompUnwinder::PopSeccompStackFrame(RawContextCPU* cpu,
uint32_t top = thread.stack.start_of_memory_range;
for (int i = 4; i--; ) {
if (bp < top ||
- bp + sizeof(bp) > thread.stack.start_of_memory_range +
- thread.stack.memory.data_size ||
+ bp > thread.stack.start_of_memory_range +
+ thread.stack.memory.data_size - sizeof(bp) ||
bp & 1) {
break;
}