Skip to content

Calloc() memory corruption #1

@77chenfan

Description

@77chenfan

In the file iidbicurs.c, the line:2026~2027
2026 pstmt->descriptor[i]->columnName = calloc(1,cbColName + 1);
2027 strcpy(pstmt->descriptor[i]->columnName, (char *)colName);
if calloc allocate memory failed, it will return NULL, but next the NULL will be used to point colName.
it will happen the memory corruption.

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