heap-corruption

C++/msvc6 application crashes due to heap corruption, any hints?

Hello all, let me say first that I'm writing this question after months of trying to find out the root of a crash happening in our application. I'll try to detail as much as possible what I've already found out about it. About the application It runs on Windows XP Professional SP2. It's built with Microsoft Visual C++ 6.0 with Service...

Why am I getting 'Heap Corruption'?

Please don't crucify me for this one. I decided it might be good to use a char* because the string I intended to build was of a known size. I am also aware that if timeinfo->tm_hour returns something other than 2 digits, things are going to go badly wrong. That said, when this function returns VIsual Studio goes ape at me about HEAP CORR...

multiple calls to realloc() seems to cause a heap corruption..

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 de...

Heap Corruption Error when deleting a pointer

I get a heap corruption error when deleting a pointer. For this project, the linking parameter for Randomized Base Address is set to Disable Image Randomization. Not sure why that is set that way. Anyway, I only get that error when a specific header file of a library is included. The strange thing is that even with that header file inclu...

How to fix heap corruption in c/c++?

This is a further question for my previous one here. Is there a general solution for this? ...

Heap corruption in c

int main () { int * b; b = (int*) malloc (1); *b=110000; free (b); return 0; } Why heap corruption happens at free (b);?IMO heap corruption already happens at *b=110000;,what do you think? ...