multiple calls to realloc() seems to cause a heap corruption..
- by Windindeed
What's the problem with this code? It crashes every time.
One time it's a failed assertion "_ASSERTE(_CrtIsValidHeapPointer(pUserData));", other times it is just a "heap corrpuption" error.
Changing the buffer size affects this issue in some strange ways - sometimes it crashes on the "realloc", and other times on the "free".
I have debugged this…