Consequences of this buffer overflow?

后端 未结 11 2075
悲&欢浪女
悲&欢浪女 2021-01-01 15:44

So here I believe I have a small buffer overflow problem I found when reviewing someone else\'s code. It immediately struck me as incorrect, and potentially dangerous, but a

11条回答
  •  不知归路
    2021-01-01 15:58

    As stated by others, you are completely correct in assuming that this is no good, and the reason you don't see this is padding. Try valgrind on this, this should definitively find that error.

提交回复
热议问题