ref: d8294b25104e9033408c18b68567281ae8e9d5e0
parent: 1c336b8ab44524dc56ea837e2211ff4207704cdd
author: Sebastian Rasmussen <sebras@gmail.com>
date: Fri Nov 6 19:33:46 EST 2020
jbig2dec: Add casts to silence a compiler warning.
--- a/jbig2_image.c
+++ b/jbig2_image.c
@@ -347,8 +347,8 @@
if (src == NULL)
return 0;
- if ((UINT32_MAX - src->width < (x > 0 ? x : -x)) ||
- (UINT32_MAX - src->height < (y > 0 ? y : -y)))
+ if ((UINT32_MAX - src->width < (uint32_t) (x > 0 ? x : -x)) ||
+ (UINT32_MAX - src->height < (uint32_t) (y > 0 ? y : -y)))
{
#ifdef JBIG2_DEBUG
jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, JBIG2_UNKNOWN_SEGMENT_NUMBER, "overflow in compose_image");