Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Try to download a tree over a compressed connection to a daemon.
[rsync/rsync.git]
/
zlib
/
infblock.c
diff --git
a/zlib/infblock.c
b/zlib/infblock.c
index
3d6701e
..
58f0628
100644
(file)
--- a/
zlib/infblock.c
+++ b/
zlib/infblock.c
@@
-249,10
+249,12
@@
int r;
&s->sub.trees.tb, s->hufts, z);
if (t != Z_OK)
{
&s->sub.trees.tb, s->hufts, z);
if (t != Z_OK)
{
- ZFREE(z, s->sub.trees.blens);
r = t;
if (r == Z_DATA_ERROR)
r = t;
if (r == Z_DATA_ERROR)
- s->mode = zBAD;
+ {
+ ZFREE(z, s->sub.trees.blens);
+ s->mode = zBAD;
+ }
LEAVE
}
s->sub.trees.index = 0;
LEAVE
}
s->sub.trees.index = 0;
@@
-317,10
+319,14
@@
int r;
if (t != Z_OK)
{
if (t == (uInt)Z_DATA_ERROR)
if (t != Z_OK)
{
if (t == (uInt)Z_DATA_ERROR)
- s->mode = zBAD;
+ {
+ ZFREE(z, s->sub.trees.blens);
+ s->mode = zBAD;
+ }
r = t;
LEAVE
}
r = t;
LEAVE
}
+ ZFREE(z, s->sub.trees.blens);
Tracev((stderr, "inflate: trees ok\n"));
if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL)
{
Tracev((stderr, "inflate: trees ok\n"));
if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL)
{
@@
-345,13
+351,6
@@
int r;
s->mode = TYPE;
break;
}
s->mode = TYPE;
break;
}
- if (k > 7) /* return unused byte, if any */
- {
- Assert(k < 16, "inflate_codes grabbed too many bytes")
- k -= 8;
- n++;
- p--; /* can always return one */
- }
s->mode = DRY;
case DRY:
FLUSH
s->mode = DRY;
case DRY:
FLUSH