Tag Info

New answers tagged

3

I just wrote a very simple example for demonstrating one possible form of dangling pointer vulnerability. You can directly run it and type "aaaaaaaaS" to reach the goal statement. Hope it would be helpful. int main(){ char* data = (char *)malloc(32); // Assuming that the 9th char is critical... data[8] = 'L'; printf("data buffer at address ...


1

In C or C++, a dangling pointer is what you (as a programmer) get when you have a pointer to dynamically allocated memory, delete/free that memory, but keep using the pointer. The pointer now points to unallocated memory and trying to access it will likely crash the program. However, under certain circumstances it can happen that the memory gets reallocated ...



Top 50 recent answers are included