Fixed a null pointer dereference (#2709)

This commit is contained in:
xarkes 2021-06-29 19:36:26 +02:00 committed by GitHub
parent 771fa6102c
commit 2d778c01d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2939,6 +2939,9 @@ QList<RelocDescription> CutterCore::getAllRelocs()
if (core && core->bin && core->bin->cur && core->bin->cur->o) { if (core && core->bin && core->bin->cur && core->bin->cur->o) {
auto relocs = rz_bin_object_patch_relocs(core->bin->cur, core->bin->cur->o); auto relocs = rz_bin_object_patch_relocs(core->bin->cur, core->bin->cur->o);
if (!relocs) {
return ret;
}
for (size_t i = 0; i < relocs->relocs_count; i++) { for (size_t i = 0; i < relocs->relocs_count; i++) {
RzBinReloc *reloc = relocs->relocs[i]; RzBinReloc *reloc = relocs->relocs[i];
RelocDescription desc; RelocDescription desc;