fixed segfault. (wrongly translated loop instruction from asm)

This commit is contained in:
2025-04-18 17:21:04 +03:00
parent 9d4984371b
commit 864ac24998

View File

@@ -60,7 +60,7 @@ unsigned preprocess_calltrick(unsigned char *infile, unsigned insize, unsigned c
do {
//printf("infile_ptr = %p, count = %u\n", infile_ptr, count);
unsigned al = *(infile_ptr++);
al -= 0x0E8;
al -= 0x0E8; // relative call opcode
if (al > 1) {
continue;
}
@@ -82,8 +82,7 @@ unsigned preprocess_calltrick(unsigned char *infile, unsigned insize, unsigned c
memcpy(buf_ptr, &infile_ptr, sizeof(buf_ptr));
buf_ptr += sizeof(buf_ptr);
}
} while(count > 0);
} while(--count > 0);
unsigned idx = 0;
while (idx < 256 && ct1[idx] != 0) {