Esempio n. 1
0
static void * load_bytes(const ut8 *buf, ut64 sz, ut64 loadaddr, Sdb *sdb){
	void *res = NULL;
	RBuffer *tbuf = NULL;

	if (!buf || sz == 0 || sz == UT64_MAX) return NULL;
	tbuf = r_buf_new();
	r_buf_set_bytes (tbuf, buf, sz);
	res = r_bin_te_new_buf (tbuf);
	r_buf_free (tbuf);
	return res;
}
Esempio n. 2
0
static int load(RBinFile *arch) {
	if(!(arch->o->bin_obj = r_bin_te_new_buf (arch->buf)))
		return R_FALSE;
	return R_TRUE;
}