[Solved] pointer trying to access beyond the heap area [closed]


Writing into the heap beyond a valid malloc’ed location results in undefined behavior. It may or may not result in a seg fault. Depends on what is in the heap location and how it is used by the rest of the program.

Your program may not fail at all. But it does corrupt the heap so eventually, if you program was longer you would see problems. Hard to find problems.

solved pointer trying to access beyond the heap area [closed]