27 lines
977 B
Diff
Executable File
27 lines
977 B
Diff
Executable File
From d8294b25104e9033408c18b68567281ae8e9d5e0 Mon Sep 17 00:00:00 2001
|
|
From: Sebastian Rasmussen <sebras@gmail.com>
|
|
Date: Sat, 7 Nov 2020 00:33:46 +0800
|
|
Subject: [PATCH] jbig2dec: Add casts to silence a compiler warning.
|
|
|
|
---
|
|
jbig2_image.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/jbig2_image.c b/jbig2_image.c
|
|
index 2cb1e14..19eef22 100644
|
|
--- a/jbig2_image.c
|
|
+++ b/jbig2_image.c
|
|
@@ -347,8 +347,8 @@ jbig2_image_compose(Jbig2Ctx *ctx, Jbig2Image *dst, Jbig2Image *src, int x, int
|
|
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");
|
|
--
|
|
2.27.0
|