Skip to content

Potential overflow on handling brackets in ec_glob.c #157

@AlynxZhou

Description

@AlynxZhou

In https://github.com/editorconfig/editorconfig-core-c/blob/master/src/lib/ec_glob.c#L294, when we find an unpaired {, we will move all chars after it 1 byte, and insert a \, however, it seems we did not check the buffer length, so if there is a 8194 length pattern string that contains unpaired {, we will get an overflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions