diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-01-26 22:01:21 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-01-26 22:01:45 +0200 |
commit | e6a118ee85b35eb443057a2b6dbc87059deff6dc (patch) | |
tree | d78312f4f1f63118183106ea80fe9290ac6ce961 | |
parent | 2f8c409a4f441d7ef8856d2bd4ef9467204bb418 (diff) | |
download | micropython-e6a118ee85b35eb443057a2b6dbc87059deff6dc.tar.gz micropython-e6a118ee85b35eb443057a2b6dbc87059deff6dc.zip |
moduzlib: Update to uzlib v1.2.
Actually manage size of the output buffer.
-rw-r--r-- | extmod/uzlib/tinflate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/extmod/uzlib/tinflate.c b/extmod/uzlib/tinflate.c index ef484bc7d5..d5197a590e 100644 --- a/extmod/uzlib/tinflate.c +++ b/extmod/uzlib/tinflate.c @@ -337,6 +337,7 @@ static int tinf_inflate_block_data(TINF_DATA *d, TINF_TREE *lt, TINF_TREE *dt) } *d->dest++ = sym; + d->destRemaining--; } else { @@ -366,6 +367,7 @@ static int tinf_inflate_block_data(TINF_DATA *d, TINF_TREE *lt, TINF_TREE *dt) } d->dest += length; + d->destRemaining -= length; } } } @@ -397,6 +399,7 @@ static int tinf_inflate_uncompressed_block(TINF_DATA *d) /* copy block */ for (i = length; i; --i) *d->dest++ = *d->source++; + d->destRemaining -= length; /* make sure we start next block on a byte boundary */ d->bitcount = 0; |