Skip to content

make uuid_from_dmi_entries more robust #3494

Description

@igaw

during refactoring a review from copilot didn't like the implementation of uuid_from_dmi_entries: uuid_from_dmi_entries() uses sprintf() into a PATH_MAX buffer (potential overflow) and reads into buf without guaranteeing NUL-termination before calling sscanf(). If read() fills the buffer completely, sscanf() may read past the buffer looking for a terminator.

#3486 (comment)

Metadata

Metadata

Assignees

No one assigned

    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