-
Notifications
You must be signed in to change notification settings - Fork 633
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Prevent overflow in chromaticity calculations
In `png_xy_from_XYZ` X+Y+Z was calculated without checking for overflow. This fixes that by moving the correct code from `png_XYZ_normalize` into a static function which is now used from `png_xy_from_XYZ`. Reviewed-by: Cosmin Truta <[email protected]> Signed-off-by: John Bowler <[email protected]> Signed-off-by: Cosmin Truta <[email protected]>
- Loading branch information
Showing
1 changed file
with
46 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters