Skip to content

Buffer out of bounds access through pointer in rapidxml [ASAN] #443

Open
@stevetranby

Description

@stevetranby

I'm not sure if there's an issue for this, but the check if beyond end of string should be tested before dereferencing the pointer to the buffer.

if (*text == 0 || text >= endptr_)

e.g. (should check if gone past end first, otherwise check if it points to a null terminator \0 character):

//if (*text == 0 || text >= endptr_)
if (text >= endptr_ || *text == 0)
                    break;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions