Skip to content

Image.Create() does not zero allocated memory. #119

Open
@p120ph37

Description

@p120ph37

When Image.Create() is called, it may (if the existing buffer is not already large enough, or if no buffer yet exists) allocate a new buffer. It allocated the buffer without initializing it, so whatever data happens to be in memory already ends up in the image. This can lead at best to some weird images if the new memory happens to contain non-zero pre-existing data, and a security issue at worst if the image with uninitialized pixels is being output somewhere non-privileged. I'll file a PR to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugAn error or incorrect implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions