Fix Dis fuzz failure ##bin

This commit is contained in:
meme 2023-02-23 09:41:23 -05:00 committed by pancake
parent ffaa15ade8
commit ee881405e1
1 changed files with 3 additions and 3 deletions

View File

@ -10,11 +10,10 @@
// > 11: signed 30 bits, 4 bytes
// Based off of `operand' in Inferno's load.c
static bool dis_read_operand(RBuffer *buf, st32 *n) {
ut8 b;
if (r_buf_read (buf, &b, sizeof (b)) != sizeof (b)) {
ut8 c;
if (r_buf_read (buf, &c, sizeof (c)) != sizeof (c)) {
return false;
}
st32 c = b;
switch (c & 0xc0) {
case 0x00:
@ -24,6 +23,7 @@ static bool dis_read_operand(RBuffer *buf, st32 *n) {
*n = c | ~0x7f;
return true;
case 0x80: {
ut8 b;
if (r_buf_read (buf, &b, sizeof (b)) != sizeof (b)) {
return false;
}