diff --git a/librz/arch/p/analysis/analysis_alpha_cs.c b/librz/arch/p/analysis/analysis_alpha_cs.c index d99a068ee7..fe33a487c8 100644 --- a/librz/arch/p/analysis/analysis_alpha_cs.c +++ b/librz/arch/p/analysis/analysis_alpha_cs.c @@ -475,7 +475,7 @@ RzAnalysisPlugin rz_analysis_plugin_alpha_cs = { .desc = "DEC Alpha Capstone-based disassembler", .license = "LGPL3", .arch = "alpha", - .bits = 64, + .bits = 32 | 64, .get_reg_profile = get_reg_profile, .archinfo = archinfo, .op = rz_analysis_alpha_op, diff --git a/librz/arch/p/asm/asm_alpha_cs.c b/librz/arch/p/asm/asm_alpha_cs.c index db00945c4f..bce2e81cb0 100644 --- a/librz/arch/p/asm/asm_alpha_cs.c +++ b/librz/arch/p/asm/asm_alpha_cs.c @@ -106,7 +106,7 @@ RzAsmPlugin rz_asm_plugin_alpha_cs = { .desc = "DEC Alpha Capstone-based disassembler", .license = "LGPL3", .arch = "alpha", - .bits = 64, + .bits = 32 | 64, .endian = RZ_SYS_ENDIAN_LITTLE | RZ_SYS_ENDIAN_BIG, .disassemble = &disassemble, .init = &init, diff --git a/librz/bin/format/coff/coff.c b/librz/bin/format/coff/coff.c index f9607a1c54..532bc1cbfb 100644 --- a/librz/bin/format/coff/coff.c +++ b/librz/bin/format/coff/coff.c @@ -344,6 +344,7 @@ RZ_API struct rz_bin_coff_obj *rz_bin_coff_new_buf(RzBuffer *buf) { if (!coff_guess_endianness(buf, &obj->big_endian)) { RZ_LOG_ERROR("failed to guess magic & endianness\n"); + rz_bin_coff_free(obj); return NULL; } else if (!bin_coff_init_hdr(buf, obj, &offset)) { RZ_LOG_ERROR("failed to init hdr\n"); diff --git a/librz/bin/format/ecoff/ecoff.c b/librz/bin/format/ecoff/ecoff.c index 5dd600042d..c68e0f6cef 100644 --- a/librz/bin/format/ecoff/ecoff.c +++ b/librz/bin/format/ecoff/ecoff.c @@ -308,8 +308,6 @@ static bool ecoff_parse_symbols_32(RzBuffer *buffer, ECoff_32 *ecoff) { return ecoff_parse_old_symbols(buffer, ecoff); } - return ecoff_parse_local_symbols_32(buffer, ecoff); - return ecoff_parse_local_symbols_32(buffer, ecoff) && ecoff_parse_external_symbols_32(buffer, ecoff) && ecoff_parse_file_descriptor_entries_32(buffer, ecoff) && @@ -420,9 +418,9 @@ fail: static ut32 ecoff_section_flags_to_perms(ut64 s_flags) { ut32 perms = 0; - if (s_flags & ECOFF_SECTION_TYPE_REG) { + if (s_flags == ECOFF_SECTION_TYPE_REG) { // Regular section: allocated, relocated, loaded. - perms |= RZ_PERM_RWX; + return RZ_PERM_RWX; } if (s_flags & ECOFF_SECTION_TYPE_TEXT) { // Text section diff --git a/test/db/cmd/cmd_aL b/test/db/cmd/cmd_aL index 6ae3dd0ab6..2795b9491c 100644 --- a/test/db/cmd/cmd_aL +++ b/test/db/cmd/cmd_aL @@ -4,7 +4,7 @@ CMDS=aL EXPECT=<