projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c55c54
)
lzo: Update dst_len even on error
author
Simon Glass
<sjg@chromium.org>
Tue, 2 Dec 2014 20:17:40 +0000
(13:17 -0700)
committer
Tom Rini
<trini@ti.com>
Wed, 14 Jan 2015 16:35:44 +0000
(11:35 -0500)
This allows the caller to easily detect how much of the destination buffer
has been used.
Signed-off-by: Simon Glass <sjg@chromium.org>
lib/lzo/lzo1x_decompress.c
patch
|
blob
|
history
diff --git
a/lib/lzo/lzo1x_decompress.c
b/lib/lzo/lzo1x_decompress.c
index 35f3793f31c61e045df3c634b5299d7c735fc623..ebdf10b988de5964bb7769f2433ab91d8d99bffa 100644
(file)
--- a/
lib/lzo/lzo1x_decompress.c
+++ b/
lib/lzo/lzo1x_decompress.c
@@
-102,8
+102,10
@@
int lzop_decompress(const unsigned char *src, size_t src_len,
tmp = dlen;
r = lzo1x_decompress_safe((u8 *) src, slen, dst, &tmp);
- if (r != LZO_E_OK)
+ if (r != LZO_E_OK) {
+ *dst_len = dst - start;
return r;
+ }
if (dlen != tmp)
return LZO_E_ERROR;