How to identify the overwritten buffer's in C/C++ programming.
Usually when we allocate memory using malloc(),
CRT does that with the hex value "FD" before and
after the memory being allocated. We can do the
check of them by looking into the memory view of
that allocated particular memory address.
While writing to the buffer if we examine
these memory locations, we can able to identity
whether we are using memory over than the allocated
size.
This is a simple method or a quick examining
method to override memory issues becuase of wrong
allocation.
No comments:
Post a Comment