代码:
char line[MAX] = {0};
strncpy(line,pBeginObj,(ptemp - pBeginObj + 1));
log如下:
解释:
char *strncpy(char *dest, const char *src, int n)
把src所指向的字符串中以src地址开始的前n个字节复制到dest所指的数组中
0x746d498e86 - 0x756d498cda = 1ac = 428
MAX = 256;
429>256,strncpy内存拷贝越界,导致栈溢出!!!
来源:CSDN
作者:羽落长安
链接:https://blog.csdn.net/u012906122/article/details/103639970