mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-26 17:15:38 +00:00
Refix the objc parsing boundary check (#18648)
Co-authored-by: pancake <pancake@nopcode.org>
This commit is contained in:
parent
b146df6aa3
commit
7226f0e43c
@ -258,7 +258,15 @@ static bool objc_find_refs(RCore *core) {
|
||||
}
|
||||
|
||||
classMethodsVA += 8; // advance to start of class methods array
|
||||
ut64 to = classMethodsVA + (objc2ClassMethSize * count);
|
||||
ut64 delta = (objc2ClassMethSize * count);
|
||||
ut64 to = classMethodsVA + delta - 8;
|
||||
if (delta > objc->file_size) {
|
||||
eprintf ("Workaround: Corrupted objc data? checking next %llx !< %llx\n", classMethodsVA, to);
|
||||
count = (objc->_data->vsize / objc2ClassMethSize) - 1;
|
||||
delta = objc2ClassMethSize * count;
|
||||
to = classMethodsVA + delta;
|
||||
|
||||
}
|
||||
if (classMethodsVA > to) {
|
||||
eprintf ("Warning: Fuzzed binary or bug in here, checking next %llx !< %llx\n", classMethodsVA, to);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user