mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-23 06:14:53 +00:00
Few code corrections (#10816)
This commit is contained in:
parent
f260195ad5
commit
12e587f112
@ -87,7 +87,7 @@ struct r_bin_mz_segment_t * r_bin_mz_get_segments(const struct r_bin_mz_obj_t *b
|
||||
paddr = r_bin_mz_seg_to_paddr (bin, relocs[i].segment) + relocs[i].offset;
|
||||
if ((paddr + 2) < bin->dos_file_size) {
|
||||
int left;
|
||||
ut16 *curr_seg = r_buf_get_at (bin->b, paddr, &left);
|
||||
ut16 *curr_seg = (ut16 *)r_buf_get_at (bin->b, paddr, &left);
|
||||
/* Add segment only if it's located inside dos executable data */
|
||||
if (left >= 2 && r_read_le16 (curr_seg) <= last_parag) {
|
||||
btree_add (&tree, curr_seg, cmp_segs);
|
||||
|
@ -1413,7 +1413,7 @@ static void get_hash_debug_file(RCore *core, const char *path, char *hash, int h
|
||||
int bd = -1;
|
||||
RBinFile *old_cur = r_bin_cur (core->bin);
|
||||
|
||||
RBinOptions *bo = r_bin_options_new (0LL, 0LL, NULL);
|
||||
RBinOptions *bo = r_bin_options_new (0LL, 0LL, 0);
|
||||
if (!bo) {
|
||||
eprintf ("Could not create RBinOptions\n");
|
||||
goto out_error;
|
||||
|
@ -1730,7 +1730,7 @@ R_API char* r_print_colorize_opcode(RPrint *print, char *p, const char *reg, con
|
||||
j += strlen (reset);
|
||||
o[j] = p[i];
|
||||
if (!(p[i+1] == '$' || ((p[i+1] > '0') && (p[i+1] < '9')))) {
|
||||
char *color = found_var ? print->cons->pal.func_var_type : reg;
|
||||
const char *color = found_var ? print->cons->pal.func_var_type : reg;
|
||||
ut32 color_len = strlen (color);
|
||||
if (color_len + j + 10 >= COLORIZE_BUFSIZE) {
|
||||
eprintf ("r_print_colorize_opcode(): buffer overflow!\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user