Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4251)

Unified Diff: client/linux/dump_writer_common/seccomp_unwinder.cc

Issue 3754003: Fix overflow error in breakpad for linux Base URL: https://chromium.googlesource.com/external/google-breakpad/src.git@master
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/linux/dump_writer_common/seccomp_unwinder.cc
diff --git a/client/linux/dump_writer_common/seccomp_unwinder.cc b/client/linux/dump_writer_common/seccomp_unwinder.cc
index 49971557f38065db5e5ef04f5a94aad8a69c6363..241bf1b0c1fac7320fe8286d2c607bff6fdb234f 100644
--- a/client/linux/dump_writer_common/seccomp_unwinder.cc
+++ b/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) ||
markus 2015/02/05 22:34:35 Thank you very much for spotting this. Integer ove
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted