mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Fix 'pow' macros in pngvalid.c
It is legal for 'pow' to be a macro, therefore the argument list cannot contain preprocessing directives. Make sure pow is a function where this happens (this is a minimal safe fix, the issue only arises in non-performance-critical code.) Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
parent
2cd6d56ff6
commit
13ce05daaf
@ -7158,7 +7158,7 @@ image_transform_png_set_rgb_to_gray_ini(const image_transform *this,
|
|||||||
* conversion adds another +/-2 in the 16-bit case and
|
* conversion adds another +/-2 in the 16-bit case and
|
||||||
* +/-(1<<(15-PNG_MAX_GAMMA_8)) in the 8-bit case.
|
* +/-(1<<(15-PNG_MAX_GAMMA_8)) in the 8-bit case.
|
||||||
*/
|
*/
|
||||||
that->pm->limit += pow(
|
that->pm->limit += (pow)(
|
||||||
# if PNG_MAX_GAMMA_8 < 14
|
# if PNG_MAX_GAMMA_8 < 14
|
||||||
(that->this.bit_depth == 16 ? 8. :
|
(that->this.bit_depth == 16 ? 8. :
|
||||||
6. + (1<<(15-PNG_MAX_GAMMA_8)))
|
6. + (1<<(15-PNG_MAX_GAMMA_8)))
|
||||||
@ -7182,7 +7182,7 @@ image_transform_png_set_rgb_to_gray_ini(const image_transform *this,
|
|||||||
* affects the limit used for checking for internal calculation errors,
|
* affects the limit used for checking for internal calculation errors,
|
||||||
* not the actual limit imposed by pngvalid on the output errors.
|
* not the actual limit imposed by pngvalid on the output errors.
|
||||||
*/
|
*/
|
||||||
that->pm->limit += pow(
|
that->pm->limit += (pow)(
|
||||||
# if DIGITIZE
|
# if DIGITIZE
|
||||||
1.3
|
1.3
|
||||||
# else
|
# else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user