summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2019-10-31 16:37:46 -0400
committerAdam Jackson <ajax@redhat.com>2019-11-01 14:36:54 -0400
commit1f5b20c4aa19461a84799387c8e9107b6010ea24 (patch)
treeede40a9046ebf1426ad9354b593c3ba3468ac105
parentbcfb3490db782ce5d2d6bd185b68f67bc6dfad06 (diff)
downloadpixman-1f5b20c4aa19461a84799387c8e9107b6010ea24.tar.gz
pixman-matrix: Fix left shift of a negative number
../pixman/pixman-matrix.c:276:35: runtime error: left shift of negative value -32768
-rw-r--r--pixman/pixman-matrix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pixman/pixman-matrix.c b/pixman/pixman-matrix.c
index 4032c13..81b6e61 100644
--- a/pixman/pixman-matrix.c
+++ b/pixman/pixman-matrix.c
@@ -273,7 +273,7 @@ pixman_transform_point_31_16 (const pixman_transform_t *t,
{
/* the divisor is small, we can actually keep all the bits */
int64_t hi, rhi, lo, rlo;
- int64_t div = (divint << 16) + divfrac;
+ int64_t div = ((uint64_t)divint << 16) + divfrac;
fixed_64_16_to_int128 (tmp[0][0], tmp[0][1], &hi, &lo, 32);
rlo = rounded_sdiv_128_by_49 (hi, lo, div, &rhi);