summaryrefslogtreecommitdiff
path: root/fastboot/bootimg_utils.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2018-03-28 15:12:49 -0700
committerChristopher Ferris <cferris@google.com>2018-03-28 17:21:01 -0700
commit6dbc28ece3ab7cadd0087b4dc31ba9a2986545f0 (patch)
tree0f7f5ad39abcafaf218855dd6ef7efa939f1fbdf /fastboot/bootimg_utils.cpp
parentc41ff1b366eabad4371a972f6be9648990658760 (diff)
Fix null pointer dereference in RegsArm.
Fix RegsArm::GetPcAdjustment to check for an invalid elf before trying to read memory. Modify the tests for this so it crashes without this change. Also modify the GetPcAdjustment for all different architectures so that unless the relative pc is too small, it will return the minimum amount that should be adjusted. This is to handle cases where we still want to adjust the pc but it's in an invalid elf. Mostly this is for handling cases when the pc is in jit gdb debug code so that we use the right unwind information. Bug: 77233204 Test: Passes unit tests for libbacktrace/libunwindstack. Change-Id: Id73609adaf3b80a583584441de228156fec3afa7
Diffstat (limited to 'fastboot/bootimg_utils.cpp')
0 files changed, 0 insertions, 0 deletions