这是indexloc提供的服务,不要输入任何密码
Skip to content

Out of bounds access in getBreakpoint() #1098

@apangin

Description

@apangin

Describe the bug

The issue was found with a static analyzer:

        // Parse access type [:rwx]
        c = strrchr(buf, ':');
        if (c != NULL && c != name && c[-1] != ':') {
                         ^^^^^^^^^

c will never be equal to name; we should check c != buf instead.

Expected vs. actual behavior

No response

Reproduction Steps

No response

Additional Information/Context

No response

Async-profiler version

master

Environment details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions