1 diff -uNr compcache-0.5/sub-projects/compression/lzo-kmod/lzo1x_compress.c compcache-0.5/sub-projects/compression/lzo-kmod/lzo1x_compress.c
2 --- compcache-0.5/sub-projects/compression/lzo-kmod/lzo1x_compress.c 2008-08-13 06:33:34.000000000 +0200
3 +++ compcache-0.5/sub-projects/compression/lzo-kmod/lzo1x_compress.c 2009-01-21 08:00:35.000000000 +0100
8 +#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
9 if (get_unaligned((const unsigned short *)m_pos)
10 == get_unaligned((const unsigned short *)ip)) {
12 + if (m_pos[0] == ip[0] && m_pos[1] == ip[1]) {
14 if (likely(m_pos[2] == ip[2]))
52 *op++ = M4_MARKER | 1;
55 MODULE_LICENSE("GPL");
56 MODULE_DESCRIPTION("LZO1X-1 Compressor");
58 diff -uNr compcache-0.5/sub-projects/compression/lzo-kmod/lzo1x_decompress.c compcache-0.5/sub-projects/compression/lzo-kmod/lzo1x_decompress.c
59 --- compcache-0.5/sub-projects/compression/lzo-kmod/lzo1x_decompress.c 2008-08-13 06:33:42.000000000 +0200
60 +++ compcache-0.5/sub-projects/compression/lzo-kmod/lzo1x_decompress.c 2009-01-21 07:49:41.000000000 +0100
63 if (HAVE_IP(t + 1, ip_end, ip))
68 - goto first_literal_run;
69 + goto prep_first_literal_run;
72 while ((ip < ip_end)) {
74 if (HAVE_IP(t + 4, ip_end, ip))
107 +prep_first_literal_run:
115 - m_pos -= le16_to_cpu(get_unaligned(
116 - (const unsigned short *)ip)) >> 2;
117 + m_pos -= get_unaligned_le16(ip) >> 2;
119 } else if (t >= 16) {
125 - m_pos -= le16_to_cpu(get_unaligned(
126 - (const unsigned short *)ip)) >> 2;
127 + m_pos -= get_unaligned_le16(ip) >> 2;
131 @@ -184,21 +176,33 @@
132 if (HAVE_OP(t + 3 - 1, op_end, op))
135 - if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) {
141 + if (t >= 2 * 4 - (3 - 1)) {
143 + * Assume memcpy don't copy
144 + * more than 32 bytes at once
146 + if ((op - m_pos) >= 32) {
148 + memcpy(op, m_pos, t);
151 + } else if ((op - m_pos) >= 4) {
178 return LZO_E_LOOKBEHIND_OVERRUN;
181 EXPORT_SYMBOL_GPL(lzo1x_decompress_safe);
183 MODULE_LICENSE("GPL");
184 MODULE_DESCRIPTION("LZO1X Decompressor");