CRT detected that application wrote memory after end of heap buffer.

在程序的开始处我申请了一块内存,中间对其进行了一些操作,在程序结束处,释放内存的时候,引起错误:

HEAP CORRUPTION DETECTED:after Normal block(#***) at 0x****.CRT detected that application wrote memory after end of heap buffer.

错误原因:

以对内在操作的过程中,所写的地址超出了,所分配内在的边界

memcpy的时候,size参数比new出来的空间还大

原文地址:https://www.cnblogs.com/lzjsky/p/1845551.html