diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-26 17:51:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-26 17:51:15 -0400 |
commit | d87823813fe498fdd47894bd28e460a9dee8d771 (patch) | |
tree | 214eaf3babd0d61f08022fc1edd99a5128616548 /lib | |
parent | e382608254e06c8109f40044f5e693f2e04f3899 (diff) | |
parent | 3dc196eae1db548f05e53e5875ff87b8ff79f249 (diff) |
Merge tag 'char-misc-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH:
"Here's the big char/misc driver pull request for 4.2-rc1.
Lots of mei, extcon, coresight, uio, mic, and other driver updates in
here. Full details in the shortlog. All of these have been in
linux-next for some time with no reported problems"
* tag 'char-misc-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (176 commits)
mei: me: wait for power gating exit confirmation
mei: reset flow control on the last client disconnection
MAINTAINERS: mei: add mei_cl_bus.h to maintained file list
misc: sram: sort and clean up included headers
misc: sram: move reserved block logic out of probe function
misc: sram: add private struct device and virt_base members
misc: sram: report correct SRAM pool size
misc: sram: bump error message level on unclean driver unbinding
misc: sram: fix device node reference leak on error
misc: sram: fix enabled clock leak on error path
misc: mic: Fix reported static checker warning
misc: mic: Fix randconfig build error by including errno.h
uio: pruss: Drop depends on ARCH_DAVINCI_DA850 from config
uio: pruss: Add CONFIG_HAS_IOMEM dependence
uio: pruss: Include <linux/sizes.h>
extcon: Redefine the unique id of supported external connectors without 'enum extcon' type
char:xilinx_hwicap:buffer_icap - change 1/0 to true/false for bool type variable in function buffer_icap_set_configuration().
Drivers: hv: vmbus: Allocate ring buffer memory in NUMA aware fashion
parport: check exclusive access before register
w1: use correct lock on error in w1_seq_show()
...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4/lz4_decompress.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c index 26cc6029b280..6d940c72b5fc 100644 --- a/lib/lz4/lz4_decompress.c +++ b/lib/lz4/lz4_decompress.c | |||
@@ -140,8 +140,12 @@ static int lz4_uncompress(const char *source, char *dest, int osize) | |||
140 | /* Error: request to write beyond destination buffer */ | 140 | /* Error: request to write beyond destination buffer */ |
141 | if (cpy > oend) | 141 | if (cpy > oend) |
142 | goto _output_error; | 142 | goto _output_error; |
143 | #if LZ4_ARCH64 | ||
144 | if ((ref + COPYLENGTH) > oend) | ||
145 | #else | ||
143 | if ((ref + COPYLENGTH) > oend || | 146 | if ((ref + COPYLENGTH) > oend || |
144 | (op + COPYLENGTH) > oend) | 147 | (op + COPYLENGTH) > oend) |
148 | #endif | ||
145 | goto _output_error; | 149 | goto _output_error; |
146 | LZ4_SECURECOPY(ref, op, (oend - COPYLENGTH)); | 150 | LZ4_SECURECOPY(ref, op, (oend - COPYLENGTH)); |
147 | while (op < cpy) | 151 | while (op < cpy) |
@@ -266,7 +270,13 @@ static int lz4_uncompress_unknownoutputsize(const char *source, char *dest, | |||
266 | if (cpy > oend - COPYLENGTH) { | 270 | if (cpy > oend - COPYLENGTH) { |
267 | if (cpy > oend) | 271 | if (cpy > oend) |
268 | goto _output_error; /* write outside of buf */ | 272 | goto _output_error; /* write outside of buf */ |
269 | 273 | #if LZ4_ARCH64 | |
274 | if ((ref + COPYLENGTH) > oend) | ||
275 | #else | ||
276 | if ((ref + COPYLENGTH) > oend || | ||
277 | (op + COPYLENGTH) > oend) | ||
278 | #endif | ||
279 | goto _output_error; | ||
270 | LZ4_SECURECOPY(ref, op, (oend - COPYLENGTH)); | 280 | LZ4_SECURECOPY(ref, op, (oend - COPYLENGTH)); |
271 | while (op < cpy) | 281 | while (op < cpy) |
272 | *op++ = *ref++; | 282 | *op++ = *ref++; |