mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-04 12:27:40 +00:00
pemixed is no longer our friend
This commit is contained in:
parent
efe53437ff
commit
f2bf39beb5
@ -454,6 +454,12 @@ R_API int r_bin_load_io_at_offset_as_sz(RBin *bin, int fd, ut64 baseaddr,
|
|||||||
// change the name to something like
|
// change the name to something like
|
||||||
// <xtr_name>:<bin_type_name>
|
// <xtr_name>:<bin_type_name>
|
||||||
r_list_foreach (bin->binxtrs, it, xtr) {
|
r_list_foreach (bin->binxtrs, it, xtr) {
|
||||||
|
if (xtr && !strcmp (xtr->name, "xtr.pemixed")) {
|
||||||
|
// XXX pemixed is always loaded because it uses
|
||||||
|
// XXX the same signature for fat and non-fat
|
||||||
|
// XXX so we need to make that action implicit
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (xtr && xtr->check_bytes (buf_bytes, sz)) {
|
if (xtr && xtr->check_bytes (buf_bytes, sz)) {
|
||||||
if (xtr && (xtr->extract_from_bytes || xtr->extractall_from_bytes)) {
|
if (xtr && (xtr->extract_from_bytes || xtr->extractall_from_bytes)) {
|
||||||
if (is_debugger && sz != file_sz) {
|
if (is_debugger && sz != file_sz) {
|
||||||
|
@ -14,15 +14,14 @@ static int free_xtr (void *xtr_obj);
|
|||||||
|
|
||||||
//copied from bin_pe
|
//copied from bin_pe
|
||||||
//another check is used later to check for .NET only code
|
//another check is used later to check for .NET only code
|
||||||
static bool check_bytes(const ut8 *bytes, ut64 sz){
|
static bool check_bytes(const ut8 *bytes, ut64 sz) {
|
||||||
unsigned int idx;
|
|
||||||
if (!bytes) {
|
if (!bytes) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (sz <= 0x3d) { //less than size of MS-DOS header which is 64bytes
|
if (sz <= 0x3d) { //less than size of MS-DOS header which is 64bytes
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
idx = (bytes[0x3c] | (bytes[0x3d]<<8));
|
ut32 idx = (bytes[0x3c] | (bytes[0x3d]<<8));
|
||||||
if (sz > idx + 0x18 + 2) {
|
if (sz > idx + 0x18 + 2) {
|
||||||
/* Here PE signature for usual PE files
|
/* Here PE signature for usual PE files
|
||||||
* and PL signature for Phar Lap TNT DOS extender 32bit executables
|
* and PL signature for Phar Lap TNT DOS extender 32bit executables
|
||||||
|
@ -255,7 +255,8 @@ typedef struct r_bin_object_t {
|
|||||||
void *bin_obj; // internal pointer used by formats
|
void *bin_obj; // internal pointer used by formats
|
||||||
} RBinObject;
|
} RBinObject;
|
||||||
|
|
||||||
// XXX: this is a copy of RBinObject
|
// XXX: RbinFile may hold more than one RBinObject
|
||||||
|
/// XX curplugin == o->plugin
|
||||||
typedef struct r_bin_file_t {
|
typedef struct r_bin_file_t {
|
||||||
char *file;
|
char *file;
|
||||||
int fd;
|
int fd;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user