mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-08 06:12:13 +00:00
Fix #251 - Segmentation fault running "rabin2 -I classes.dex"
This commit is contained in:
parent
077ab18846
commit
de857fa91d
@ -117,6 +117,10 @@ static RBinInfo *info(RBinArch *arch) {
|
||||
h->addr = 0x8;
|
||||
h->from = 12;
|
||||
h->to = arch->buf->length-h->from;
|
||||
|
||||
h = &ret->sum[2];
|
||||
h->type = 0;
|
||||
|
||||
memcpy (h->buf, arch->buf->buf+8, 4);
|
||||
{
|
||||
ut32 *fc = (ut32 *)(arch->buf->buf + 8);
|
||||
|
@ -214,7 +214,8 @@ static int bin_info (RCore *r, int mode) {
|
||||
RBinHash *h = &info->sum[i];
|
||||
ut64 hash = r_hash_name_to_bits (h->type);
|
||||
RHash *rh = r_hash_new (R_TRUE, hash);
|
||||
len = r_hash_calculate (rh, hash, (const ut8*)r->bin->cur.buf+h->from, h->to);
|
||||
len = r_hash_calculate (rh, hash, (const ut8*)
|
||||
r->bin->cur.buf->buf+h->from, h->to);
|
||||
//ut8 *p = r->bin->cur.buf+h->addr;
|
||||
if (len<1) eprintf ("Invaild wtf\n");
|
||||
r_hash_free (rh);
|
||||
|
@ -90,7 +90,7 @@ typedef struct r_bin_info_t {
|
||||
int has_pi; // pic/pie
|
||||
int big_endian;
|
||||
ut64 dbg_info;
|
||||
RBinHash sum[2];
|
||||
RBinHash sum[3];
|
||||
} RBinInfo;
|
||||
|
||||
typedef struct r_bin_object_t {
|
||||
|
Loading…
Reference in New Issue
Block a user