Skip to content

Commit

Permalink
left over fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
trolldbois committed Jul 18, 2017
1 parent 0197c69 commit f3ca8ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions haystack/reverse/heuristics/pointertypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def reverse_record(self, _context, _record):
field.type.set_pointer_to_ext_lib()
field.type.set_pointee_ctype('void')
# TODO: Function pointer ?
field.name = 'ptr_ext_lib_%d' % field.type.offset
field.type.name = 'ptr_ext_lib_%d' % field.type.offset
# if value in self.__functions_pointers:
# size, bbs, name = self.__functions_pointers[value]
# field.name = 'func_ptr_%s_%d' % (name, field.offset)
Expand All @@ -77,7 +77,7 @@ def reverse_record(self, _context, _record):
log.debug('there is no child structure enclosing pointed value %0.8x - %s', value, e)
field.type.set_pointee_desc('MemoryHandler management space')
field.type.set_pointee_ctype('void')
field.name = 'ptr_void_%d' % field.type.offset
field.type.name = 'ptr_void_%d' % field.type.offset
continue
# structure found
## log.debug('Looking at child id:0x%x str:%s', tgt.address, tgt.to_string())
Expand All @@ -92,7 +92,7 @@ def reverse_record(self, _context, _record):
log.debug('there is no field at pointed value %0.8x. May need splitting byte field - %s', value, e)
field.type.set_pointee_desc('Badly reversed field')
field.type.set_pointee_ctype('void')
field.name = 'ptr_void_%d' % field.type.offset
field.type.name = 'ptr_void_%d' % field.type.offset
continue
# do not put exception for field 0. structure name should appears
# anyway.
Expand All @@ -104,7 +104,7 @@ def reverse_record(self, _context, _record):
# offset
field.type.set_pointee_ctype(tgt.name)
# field.name = '%s_%s_%d' % (tgt.name, tgt_field.name, field.offset)
field.name = 'ptr_%s_%d' % (tgt.name, field.type.offset)
field.type.name = 'ptr_%s_%d' % (tgt.name, field.type.offset)
# all

_record.set_reverse_level(self._reverse_level)
Expand Down

0 comments on commit f3ca8ea

Please sign in to comment.