Skip to content

Commit

Permalink
Fix #2852 - oob read with the command pid 0
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarofe authored and radare committed Jun 28, 2015
1 parent daf8e5b commit 3e47bd4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libr/core/cmd_print.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,7 @@ static int pdi(RCore *core, int nb_opcodes, int nb_bytes, int fmt) {
show_bytes = 0;
decode = 1;
}
if (!nb_opcodes && !nb_bytes) return 0;

if (!nb_opcodes) {
nb_opcodes = 0xffff;
Expand Down Expand Up @@ -990,7 +991,7 @@ static int pdi(RCore *core, int nb_opcodes, int nb_bytes, int fmt) {
}
} else {
if (filter) {
char opstr[128];
char opstr[128] = {0};
if (show_color) {
RAnalOp aop = {0};
char *asm_str = r_print_colorize_opcode (asmop.buf_asm, color_reg, color_num);
Expand Down

0 comments on commit 3e47bd4

Please sign in to comment.