Skip to content

mmap on expanded files writes beyond allocated memory #10527

@petersalomonsen

Description

@petersalomonsen

When appending to a file, the buffer size is increased in chunks, and so the actual length of the file could be less than the length of the allocated buffer.

When using mmap on an such a file, content from the over-allocated buffer is being written beyond the allocated memory - causing corruption.

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