Skip to content

Fix overflow in pixel formats#44

Open
Erik-White wants to merge 1 commit into
SixLabors:mainfrom
Erik-White:bugfix/pixel-format-overflow
Open

Fix overflow in pixel formats#44
Erik-White wants to merge 1 commit into
SixLabors:mainfrom
Erik-White:bugfix/pixel-format-overflow

Conversation

@Erik-White
Copy link
Copy Markdown
Contributor

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Fixes integer overflow in three generated pixel format files. Casting to unit could result in an overflow when shifting, widening to a long allows for correct shifting without overflow.

I have not included regression tests in this PR, they will be part of the HDR support for ASTC which will cover this indirectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant