Skip to content

Commit 027cd9b

Browse files
committed
Fix oobread crash in RAnal.hexagon (tests_64900) ##crash
Reported by giantbranch of NSFOCUS TIANJI Lab
1 parent 47ea621 commit 027cd9b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libr/anal/p/anal_hexagon.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010
#include "hexagon_anal.h"
1111

1212
static int hexagon_v6_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *buf, int len, RAnalOpMask mask) {
13-
HexInsn hi = {0};;
13+
HexInsn hi = {0};
1414
ut32 data = 0;
15+
if (len < 4) {
16+
return 0;
17+
}
1518
data = r_read_le32 (buf);
1619
int size = hexagon_disasm_instruction (data, &hi, (ut32) addr);
1720
op->size = size;

0 commit comments

Comments
 (0)