Skip to content

1.不支持64位系统 2.free错误的内存地址 3.多次free同一地址 #4

Description

@xlbtlmy

在使用demo工程的时候,遇到以下几个问题:
1.64位系统因指针占8个字节导致地址错位,可以加以说明
2.csonFree函数释放CSON_TYPE_LIST类型时,如果是csonIsBasicListModel类型,应为*tmpNode = (int)((p->obj)); ,而不是 *tmpNode = (int)(&(p->obj));
3.csonEncode函数在csonEncodeObject时,csonEncodeString直接使用了现有的地址,没有新分配地址
导致cJSON_Delete(json);时,会释放不是本次申请的地址,导致运行时出错malloc(): memory corruption (fast):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions