Fix CID: 1214312

This commit is contained in:
Adam Pridgen 2014-05-15 08:33:45 -05:00
parent 0674aa9c60
commit 19760814be
10 changed files with 10 additions and 10 deletions

View File

@ -22,7 +22,7 @@ static void * load_bytes(const ut8 *buf, ut64 sz, ut64 loadaddr, Sdb *sdb){
static int load(RBinFile *arch) {
const ut8 *bytes = arch ? r_buf_buffer (arch->buf) : NULL;
ut64 sz = arch ? r_buf_size (arch->buf): 0;
if (!arch->o) return R_FALSE;
if (!arch || !arch->o) return R_FALSE;
arch->o->bin_obj = load_bytes (bytes, sz, arch->o->loadaddr, arch->sdb);
return check_bytes (bytes, sz);
}

View File

@ -33,7 +33,7 @@ static int load(RBinFile *arch) {
const ut8 *bytes = arch ? r_buf_buffer (arch->buf) : NULL;
ut64 sz = arch ? r_buf_size (arch->buf): 0;
if (!arch->o) return R_FALSE;
if (!arch || !arch->o) return R_FALSE;
arch->o->bin_obj = load_bytes (bytes, sz, arch->o->loadaddr, arch->sdb);
return arch->o->bin_obj ? R_TRUE: R_FALSE;
}

View File

@ -42,7 +42,7 @@ static int load(RBinFile *arch) {
const ut8 *bytes = arch ? r_buf_buffer (arch->buf) : NULL;
ut64 sz = arch ? r_buf_size (arch->buf): 0;
if (!arch->o) return R_FALSE;
if (!arch || !arch->o) return R_FALSE;
arch->o->bin_obj = load_bytes (bytes, sz, arch->o->loadaddr, arch->sdb);
return arch->o->bin_obj ? R_TRUE: R_FALSE;
}

View File

@ -31,7 +31,7 @@ static void * load_bytes(const ut8 *buf, ut64 sz, ut64 loadaddr, Sdb *sdb){
static int load(RBinFile *arch) {
const ut8 *bytes = arch ? r_buf_buffer (arch->buf) : NULL;
ut64 sz = arch ? r_buf_size (arch->buf): 0;
if (!arch->o) return R_FALSE;
if (!arch || !arch->o) return R_FALSE;
arch->o->bin_obj = load_bytes (bytes, sz, arch->o->loadaddr, arch->sdb);
if (!(arch->o->bin_obj))
return R_FALSE;

View File

@ -78,7 +78,7 @@ static int load(RBinFile *arch) {
ut64 sz = arch ? r_buf_size (arch->buf): 0;
struct r_bin_java_obj_t* bin_obj = NULL;
if (!arch->o) return R_FALSE;
if (!arch || !arch->o) return R_FALSE;
bin_obj = load_bytes (bytes, sz, arch->o->loadaddr, arch->sdb);

View File

@ -32,7 +32,7 @@ static int load(RBinFile *arch) {
const ut8 *bytes = arch ? r_buf_buffer (arch->buf) : NULL;
ut64 sz = arch ? r_buf_size (arch->buf): 0;
if (!arch->o) return R_FALSE;
if (!arch || !arch->o) return R_FALSE;
void *res = load_bytes (bytes, sz, arch->o->loadaddr, arch->sdb);
if (!arch->o || !res) {

View File

@ -40,7 +40,7 @@ static int check_bytes(const ut8 *buf, ut64 length) {
static int load(RBinFile *arch) {
const ut8 *bytes = arch ? r_buf_buffer (arch->buf) : NULL;
ut64 sz = arch ? r_buf_size (arch->buf): 0;
if (!arch->o) return R_FALSE;
if (!arch || !arch->o) return R_FALSE;
arch->o->bin_obj = load_bytes (bytes, sz, arch->o->loadaddr, arch->sdb);
return check_bytes (bytes, sz);
}

View File

@ -41,7 +41,7 @@ static void * load_bytes(const ut8 *buf, ut64 sz, ut64 loadaddr, Sdb *sdb){
static int load(RBinFile *arch) {
const ut8 *bytes = arch ? r_buf_buffer (arch->buf) : NULL;
ut64 sz = arch ? r_buf_size (arch->buf): 0;
if (!arch->o) return R_FALSE;
if (!arch || !arch->o) return R_FALSE;
arch->o->bin_obj = load_bytes (bytes, sz, arch->o->loadaddr, arch->sdb);
return check_bytes (bytes, sz);
}

View File

@ -32,7 +32,7 @@ static int load(RBinFile *arch) {
const ut8 *bytes = arch ? r_buf_buffer (arch->buf) : NULL;
ut64 sz = arch ? r_buf_size (arch->buf): 0;
if (!arch->o) return R_FALSE;
if (!arch || !arch->o) return R_FALSE;
void *res = load_bytes (bytes, sz, arch->o->loadaddr, arch->sdb);
arch->o->bin_obj = res;

View File

@ -33,7 +33,7 @@ static int load(RBinFile *arch) {
const ut8 *bytes = arch ? r_buf_buffer (arch->buf) : NULL;
ut64 sz = arch ? r_buf_size (arch->buf): 0;
if (!arch->o) return R_FALSE;
if (!arch || !arch->o) return R_FALSE;
arch->o->bin_obj = load_bytes (bytes, sz, arch->o->loadaddr, arch->sdb);
return arch->o->bin_obj ? R_TRUE: R_FALSE;
}