aboutsummaryrefslogtreecommitdiffstats
path: root/lib/lzo/lzo1x_compress.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lzo/lzo1x_compress.c')
-rw-r--r--lib/lzo/lzo1x_compress.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/lzo/lzo1x_compress.c b/lib/lzo/lzo1x_compress.c
index c935f00073e9..a6040990a62e 100644
--- a/lib/lzo/lzo1x_compress.c
+++ b/lib/lzo/lzo1x_compress.c
@@ -32,13 +32,13 @@ _lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
32 ip += 4; 32 ip += 4;
33 33
34 for (;;) { 34 for (;;) {
35 dindex = ((0x21 * DX3(ip, 5, 5, 6)) >> 5) & D_MASK; 35 dindex = ((size_t)(0x21 * DX3(ip, 5, 5, 6)) >> 5) & D_MASK;
36 m_pos = dict[dindex]; 36 m_pos = dict[dindex];
37 37
38 if (m_pos < in) 38 if (m_pos < in)
39 goto literal; 39 goto literal;
40 40
41 if (ip == m_pos || (ip - m_pos) > M4_MAX_OFFSET) 41 if (ip == m_pos || ((size_t)(ip - m_pos) > M4_MAX_OFFSET))
42 goto literal; 42 goto literal;
43 43
44 m_off = ip - m_pos; 44 m_off = ip - m_pos;
@@ -51,7 +51,7 @@ _lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
51 if (m_pos < in) 51 if (m_pos < in)
52 goto literal; 52 goto literal;
53 53
54 if (ip == m_pos || (ip - m_pos) > M4_MAX_OFFSET) 54 if (ip == m_pos || ((size_t)(ip - m_pos) > M4_MAX_OFFSET))
55 goto literal; 55 goto literal;
56 56
57 m_off = ip - m_pos; 57 m_off = ip - m_pos;