Skip to content

Commit

Permalink
Fix oobread crash in RAnal.hexagon (tests_64900) ##crash
Browse files Browse the repository at this point in the history
Reported by giantbranch of NSFOCUS TIANJI Lab
  • Loading branch information
trufae committed Oct 30, 2021
1 parent 47ea621 commit 027cd9b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libr/anal/p/anal_hexagon.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
#include "hexagon_anal.h"

static int hexagon_v6_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *buf, int len, RAnalOpMask mask) {
HexInsn hi = {0};;
HexInsn hi = {0};
ut32 data = 0;
if (len < 4) {
return 0;
}
data = r_read_le32 (buf);
int size = hexagon_disasm_instruction (data, &hi, (ut32) addr);
op->size = size;
Expand Down

0 comments on commit 027cd9b

Please sign in to comment.