mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-02 02:06:46 +00:00
Fix const sign issue in dex
This commit is contained in:
parent
bd7c316e71
commit
a6e44bc5fa
@ -40,8 +40,9 @@ static int dalvik_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data, int l
|
||||
{
|
||||
ut32 vB = (data[1] & 0x0f);
|
||||
ut32 vA = (data[1] & 0xf0) >> 4;
|
||||
op->stackop = R_ANAL_STACK_SET;
|
||||
op->ptr = -vA;
|
||||
// op->stackop = R_ANAL_STACK_SET;
|
||||
op->ptr = -vA; // why
|
||||
op->val = vA;
|
||||
esilprintf (op, "0x%"PFMT64x",v%d,=", vA, vB);
|
||||
}
|
||||
break;
|
||||
|
@ -371,7 +371,7 @@ static int cmd_info(void *data, const char *input) {
|
||||
}
|
||||
break;
|
||||
case 'H':
|
||||
if (input[1] == 'H') { //iHH
|
||||
if (input[1] == 'H') { // "iHH"
|
||||
RBININFO ("header", R_CORE_BIN_ACC_HEADER, NULL, -1);
|
||||
break;
|
||||
}
|
||||
|
@ -2774,7 +2774,10 @@ static void ds_print_ptr(RDisasmState *ds, int len, int idx) {
|
||||
}
|
||||
} else if (!strcmp (kind, "invalid")) {
|
||||
int *n = (int*)&p;
|
||||
ut64 p = ds->analop.ptr;
|
||||
ut64 p = ds->analop.val;
|
||||
if (p == UT64_MAX || p == UT32_MAX) {
|
||||
p = ds->analop.ptr;
|
||||
}
|
||||
/* avoid double ; -1 */
|
||||
if (p != UT64_MAX && p != UT32_MAX) {
|
||||
if (*n > -0xfff && *n < 0xfff) {
|
||||
|
@ -1404,7 +1404,8 @@ static int r_cmd_java_call(void *user, const char *input) {
|
||||
}
|
||||
for (; i < END_CMDS; i++) {
|
||||
//IFDBG r_cons_printf ("Checking cmd: %s %d %s\n", JAVA_CMDS[i].name, JAVA_CMDS[i].name_len, p);
|
||||
IFDBG r_cons_printf ("Checking cmd: %s %d\n", JAVA_CMDS[i].name, strncmp (input+5, JAVA_CMDS[i].name, JAVA_CMDS[i].name_len));
|
||||
IFDBG r_cons_printf ("Checking cmd: %s %d\n", JAVA_CMDS[i].name,
|
||||
strncmp (input+5, JAVA_CMDS[i].name, JAVA_CMDS[i].name_len));
|
||||
if (!strncmp (input + 5, JAVA_CMDS[i].name, JAVA_CMDS[i].name_len)) {
|
||||
const char *cmd = input + 5 + JAVA_CMDS[i].name_len;
|
||||
if (*cmd && *cmd == ' ') cmd++;
|
||||
@ -1736,7 +1737,6 @@ static char * r_cmd_java_get_descriptor (RCore *core, RBinJavaObj *bin, ut16 idx
|
||||
char *class_name = NULL, *fullname = NULL, *name = NULL, *descriptor = NULL;
|
||||
RBinJavaCPTypeObj * obj = r_bin_java_get_item_from_bin_cp_list (bin, idx);
|
||||
char * prototype = NULL;
|
||||
|
||||
if (idx == 0) {
|
||||
prototype = strdup ("NULL");
|
||||
return prototype;
|
||||
@ -2042,7 +2042,7 @@ RCorePlugin r_core_plugin_java = {
|
||||
};
|
||||
|
||||
#ifndef CORELIB
|
||||
struct r_lib_struct_t radare_plugin = {
|
||||
RLibStruct radare_plugin = {
|
||||
.type = R_LIB_TYPE_CORE,
|
||||
.data = &r_core_plugin_java,
|
||||
.version = R2_VERSION
|
||||
|
Loading…
Reference in New Issue
Block a user