1.malloc申请空间不当,导致越界,在不定的情况下崩溃
typedef struct _tagCmsHcInst
{
。。。。。。
}cmsHcInst,*pcmsHcInst;
错误:pcmsHcInst inst = (pcmsHcInst)malloc(sizeof(pcmsHcInst))
正确:pcmsHcInst inst = (pcmsHcInst)malloc(sizeof(cmsHcInst))
1.malloc申请空间不当,导致越界,在不定的情况下崩溃
typedef struct _tagCmsHcInst
{
。。。。。。
}cmsHcInst,*pcmsHcInst;
错误:pcmsHcInst inst = (pcmsHcInst)malloc(sizeof(pcmsHcInst))
正确:pcmsHcInst inst = (pcmsHcInst)malloc(sizeof(cmsHcInst))
转载于:https://www.cnblogs.com/spiderdzl/p/3747907.html