Skip to content
Snippets Groups Projects
Commit 670c0179 authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

lzo: Update dst_len even on error


This allows the caller to easily detect how much of the destination buffer
has been used.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 9c55c54f
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment