Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
p120ph37 opened this issue Jan 19, 2022 · 0 comments · May be fixed by #120
Open

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

p120ph37 opened this issue Jan 19, 2022 · 0 comments · May be fixed by #120
Labels
Bug An error or incorrect implementation

Comments

@p120ph37
Copy link

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.

@p120ph37 p120ph37 linked a pull request Jan 19, 2022 that will close this issue
@dkrutsko dkrutsko added the Bug An error or incorrect implementation label Mar 25, 2022
@dkrutsko dkrutsko linked a pull request Mar 25, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug An error or incorrect implementation
Development

Successfully merging a pull request may close this issue.

2 participants