fixed segfault. (wrongly translated loop instruction from asm)
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user