Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1649)

Unified Diff: courgette/disassembler.cc

Issue 1031513002: Robust ELF header parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: courgette/disassembler.cc
diff --git a/courgette/disassembler.cc b/courgette/disassembler.cc
index 1b7b16e225d0c8fd03acfb70321a901a5bf60da0..e031e77f32487f583dc541f0cb52334e40bb0eba 100644
--- a/courgette/disassembler.cc
+++ b/courgette/disassembler.cc
@@ -125,8 +125,10 @@ bool Disassembler::Bad(const char* reason) {
}
void Disassembler::ReduceLength(size_t reduced_length) {
- if (reduced_length < length_)
+ if (reduced_length < length_) {
rickyz (no longer on Chrome) 2015/03/23 23:14:50 Can this just be a CHECK instead?
halyavin2 2015/03/24 14:35:17 Done.
length_ = reduced_length;
+ end_ = start_ + length_;
+ }
}
} // namespace courgette

Powered by Google App Engine
This is Rietveld 408576698