My simplified code looks like something below:
char decrypted[64] = "P@ssw0rd ";
int realsize = 8;
realloc(decrypted, realsize);
char *dec2 = (char *) malloc(realsize+1); // Exe crashes at this point
I am guessing it has to do with char *dec2 , but this only crashes Win XP for some reason.
You cannot
realloc()what hasn’t been allocated withmalloc()orcalloc()orrealloc().