错误笔记

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/superanters/article/details/82802585

1,使用strlen()计算需要分配的堆的字符串长度必须记得加一用于结束符。字符串结尾记得加结束符。

        char *content = pvPortMalloc(strlen(phItem->valuestring)+1);
        strcpy(content,phItem->valuestring);

猜你喜欢

转载自blog.csdn.net/superanters/article/details/82802585