summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bernard <miniupnp@free.fr>2020-11-10 03:00:12 +0100
committerThomas Bernard <miniupnp@free.fr>2020-11-10 03:00:12 +0100
commit19ff8a6e97bab4cd558a95bf45d03400cbbe5187 (patch)
treebc9670e3e8eb8dbd62015056bef0375af388d164
parent2e822691d750c01cec5b5cc4ee73567a204ab2a3 (diff)
downloadlibtiff-git-19ff8a6e97bab4cd558a95bf45d03400cbbe5187.tar.gz
fix undefined behaviour (int shifted too much to the left)
-rw-r--r--tools/tiff2ps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/tiff2ps.c b/tools/tiff2ps.c
index 73e6ca4c..0849c121 100644
--- a/tools/tiff2ps.c
+++ b/tools/tiff2ps.c
@@ -3048,7 +3048,7 @@ tsize_t Ascii85EncodeBlock( uint8 * ascii85_p, unsigned f_eod, const uint8 * raw
tsize_t len; /* Output this many bytes */
len = raw_l + 1;
- val32 = *++raw_p << 24; /* Prime the pump */
+ val32 = (uint32)*++raw_p << 24; /* Prime the pump */
if ( --raw_l > 0 ) val32 += *(++raw_p) << 16;
if ( --raw_l > 0 ) val32 += *(++raw_p) << 8;