mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-28 15:41:38 +00:00
Fix arm32 db/formats/dmp/dmp (#18062)
This commit is contained in:
parent
1491be12b6
commit
64e36a85af
@ -78,7 +78,7 @@ static int r_bin_dmp64_init_bmp_pages(struct r_bin_dmp64_obj_t *obj) {
|
||||
}
|
||||
ut64 paddr_base = obj->bmp_header->FirstPage;
|
||||
ut64 num_pages = obj->bmp_header->Pages;
|
||||
RBitmap *bitmap = r_bitmap_new(num_pages);
|
||||
RBitmap *bitmap = r_bitmap_new (num_pages);
|
||||
r_bitmap_set_bytes (bitmap, obj->bitmap, num_pages / 8);
|
||||
|
||||
ut64 num_bitset = 0;
|
||||
@ -109,7 +109,7 @@ static int r_bin_dmp64_init_bmp_header(struct r_bin_dmp64_obj_t *obj) {
|
||||
r_sys_perror ("R_NEW0 (dmp_bmp_header)");
|
||||
return false;
|
||||
}
|
||||
if (r_buf_read_at (obj->b, sizeof (dmp64_header), (ut8*)obj->bmp_header, sizeof (dmp_bmp_header) - sizeof (ut8*)) < 0) {
|
||||
if (r_buf_read_at (obj->b, sizeof (dmp64_header), (ut8*)obj->bmp_header, offsetof (dmp_bmp_header, Bitmap)) < 0) {
|
||||
eprintf ("Warning: read bmp_header\n");
|
||||
return false;
|
||||
}
|
||||
@ -119,10 +119,10 @@ static int r_bin_dmp64_init_bmp_header(struct r_bin_dmp64_obj_t *obj) {
|
||||
}
|
||||
ut64 bitmapsize = obj->bmp_header->Pages / 8;
|
||||
obj->bitmap = calloc (1, bitmapsize);
|
||||
if (r_buf_read_at (obj->b, sizeof (dmp64_header) + sizeof (dmp_bmp_header) - sizeof (ut8*), obj->bitmap, bitmapsize) < 0) {
|
||||
if (r_buf_read_at (obj->b, sizeof (dmp64_header) + offsetof (dmp_bmp_header, Bitmap), obj->bitmap, bitmapsize) < 0) {
|
||||
eprintf ("Warning: read bitmap\n");
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -489,7 +489,7 @@ R_PACKED (
|
||||
struct windows_exception_record64 {
|
||||
ut32 exception_code;
|
||||
ut32 exception_flags;
|
||||
struct windows_exception_record64 *exception_record;
|
||||
ut64 exception_record;
|
||||
ut64 exception_address;
|
||||
ut32 number_parameters;
|
||||
ut32 __unusedAlignment;
|
||||
|
@ -14,12 +14,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum {
|
||||
R_SYS_BITS_8 = 1,
|
||||
R_SYS_BITS_16 = 2,
|
||||
R_SYS_BITS_32 = 4,
|
||||
R_SYS_BITS_64 = 8,
|
||||
};
|
||||
#define R_SYS_BITS_8 1
|
||||
#define R_SYS_BITS_16 2
|
||||
#define R_SYS_BITS_32 4
|
||||
#define R_SYS_BITS_64 8
|
||||
|
||||
typedef struct {
|
||||
char *sysname;
|
||||
|
Loading…
Reference in New Issue
Block a user