frida/frida-java-bridge

bug in function recompileExceptionClearForArm

cr4zyserb opened this issue · 0 comments

There is a small logic issue in recompileExceptionClearForArm as when there is end of block, and relocator.readOne(); returns 0, it will throw exception, while it should break

    do {
      const offset = relocator.readOne();
      if (offset === 0) {
        throw new Error('Unexpected end of block');
      }

it should be:

    do {
      const offset = relocator.readOne();
      if (offset === 0) {
        break;
      }

As same logic is followed in recompileExceptionClearForArm64