commit | 5a7e87fc049d39c3471f403f8f0ed13d15f3e7cb | [log] [tgz] |
---|---|---|
author | John Bowler <jbowler@acm.org> | Wed Sep 11 12:27:03 2024 -0700 |
committer | Cosmin Truta <ctruta@gmail.com> | Thu Sep 12 12:14:01 2024 +0300 |
tree | ddb88ae89e6af300c697e2a82e7f6fe0c629d479 | |
parent | 8cc22a8c1549a978a9b7ef1f5bbcf4d6d02b9de9 [diff] |
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 <ctruta@gmail.com> Signed-off-by: John Bowler <jbowler@acm.org> Signed-off-by: Cosmin Truta <ctruta@gmail.com>