mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 23:20:40 +00:00
Apply some more minor fixes written offline
This commit is contained in:
parent
5a4342c601
commit
5f941cddb1
@ -301,7 +301,6 @@ static void _6502_anal_esil_flags(RAnalOp *op, ut8 data0) {
|
||||
enabled = 0;
|
||||
flag = 'V';
|
||||
break;
|
||||
break;
|
||||
}
|
||||
r_strbuf_setf (&op->esil, "%d,%c,=", enabled, flag);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
RArchPlugin r_arch_plugin_null = {
|
||||
.name = "null",
|
||||
.desc = "Fallback/Null archysis plugin",
|
||||
.desc = "Fallback/Null arch plugin",
|
||||
.arch = "none",
|
||||
.license = "LGPL3",
|
||||
.bits = R_SYS_BITS_PACK4 (8, 16, 32, 64)
|
||||
|
@ -7,7 +7,8 @@ static bool load_buffer(RBinFile *bf, void **bin_obj, RBuffer *buf, ut64 loadadd
|
||||
}
|
||||
|
||||
static void destroy(RBinFile *bf) {
|
||||
r_buf_free (bf->o->bin_obj);
|
||||
RBuffer *buf = R_UNWRAP3 (bf, o, bin_obj);
|
||||
r_buf_free (buf);
|
||||
}
|
||||
|
||||
static RList *strings(RBinFile *bf) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* radare - LGPL - Copyright 2013-2019 - pancake */
|
||||
/* radare - LGPL - Copyright 2013-2023 - pancake */
|
||||
|
||||
#include <r_bin.h>
|
||||
#include "../i/private.h"
|
||||
@ -19,7 +19,7 @@ static bool check_buffer(RBinFile *bf, RBuffer *buf) {
|
||||
const ut32 ep = sz - 0x10000 + 0xfff0; /* F000:FFF0 address */
|
||||
/* hacky check to avoid detecting multidex or MZ bins as bios */
|
||||
/* need better fix for this */
|
||||
ut8 tmp[3];
|
||||
ut8 tmp[3] = {0};
|
||||
int r = r_buf_read_at (buf, 0, tmp, sizeof (tmp));
|
||||
if (r <= 0 || !memcmp (tmp, "dex", 3) || !memcmp (tmp, "MZ", 2)) {
|
||||
return false;
|
||||
|
@ -140,7 +140,7 @@ static bool check_buffer(RBinFile *bf, RBuffer *buf) {
|
||||
}
|
||||
|
||||
static RList *entries(RBinFile *bf) {
|
||||
BootImageObj *bio = bf->o->bin_obj;
|
||||
BootImageObj *bio = R_UNWRAP3 (bf, o, bin_obj);
|
||||
RBinAddr *ptr = NULL;
|
||||
if (!bio) {
|
||||
return NULL;
|
||||
|
@ -662,15 +662,6 @@ static RBinInfo *info(RBinFile *bf) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
static RList *fields(RBinFile *bf) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static ut64 size(RBinFile *bf) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool check_buffer(RBinFile *bf, RBuffer *buf) {
|
||||
#if 0
|
||||
TODO: do more checks here to avoid false positives
|
||||
@ -703,8 +694,6 @@ RBinPlugin r_bin_plugin_coff = {
|
||||
.symbols = &symbols,
|
||||
.imports = &imports,
|
||||
.info = &info,
|
||||
.fields = &fields,
|
||||
.size = &size,
|
||||
.libs = &libs,
|
||||
.relocs = &relocs,
|
||||
.patch_relocs = &patch_relocs
|
||||
|
@ -12,7 +12,7 @@ static bool get_line(RBinFile *bf, ut64 addr, char *file, int len, int *line) {
|
||||
char *p = strchr (ret, '|');
|
||||
if (p) {
|
||||
*p = '\0';
|
||||
strncpy (file, ret, len);
|
||||
r_str_ncpy (file, ret, len);
|
||||
*line = atoi (p + 1);
|
||||
return true;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ static bool get_line(RBinFile *bf, ut64 addr, char *file, int len, int *line) {
|
||||
char *p = strchr (ret, '|');
|
||||
if (p) {
|
||||
*p = '\0';
|
||||
strncpy (file, ret, len);
|
||||
r_str_ncpy (file, ret, len);
|
||||
*line = atoi (p + 1);
|
||||
return true;
|
||||
}
|
||||
|
@ -186,10 +186,6 @@ static RList *imports(RBinFile *bf) {
|
||||
return r_bin_java_get_imports (bf->o->bin_obj);
|
||||
}
|
||||
|
||||
static RList *fields(RBinFile *bf) {
|
||||
return NULL;// r_bin_java_get_fields (bf->o->bin_obj);
|
||||
}
|
||||
|
||||
static RList *libs(RBinFile *bf) {
|
||||
return r_bin_java_get_lib_names (bf->o->bin_obj);
|
||||
}
|
||||
@ -211,7 +207,6 @@ RBinPlugin r_bin_plugin_java = {
|
||||
.imports = &imports,
|
||||
.strings = &strings,
|
||||
.info = &info,
|
||||
.fields = fields,
|
||||
.libs = libs,
|
||||
.lines = &lines,
|
||||
.classes = classes,
|
||||
|
@ -9,7 +9,7 @@ static bool load(RBin *bin) {
|
||||
if (!bin->file) {
|
||||
bin->file = bin->cur->file;
|
||||
}
|
||||
return bin->cur->xtr_obj? true : false;
|
||||
return bin->cur->xtr_obj != NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@ -449,6 +449,10 @@ static const SevenSegments ss[] = {
|
||||
" ",
|
||||
" & " }
|
||||
},
|
||||
{ '@', { " ",
|
||||
" ",
|
||||
" @ " }
|
||||
},
|
||||
{ '\0', {0}}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user