What is a “memory stomp”?

后端 未结 3 1629
青春惊慌失措
青春惊慌失措 2020-12-12 12:52

I just came across this blog post which mentions “stomping memory”:

a C++ program which is easily capable of stomping memory (something you prob

3条回答
  •  抹茶落季
    2020-12-12 13:42

    Very often it is a buffer overrun; as an example, this code:

    char buffer[8];
    buffer[8] = 'a';
    

    will "stomp" on whatever happens to be in the next thing in memory after buffer. Generally speaking, 'stomping' is when memory is written to unintentionally.

提交回复
热议问题