projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove the half-hearted attempt to make the utmp helper process drop
[u/mdw/putty]
/
sshzlib.c
diff --git
a/sshzlib.c
b/sshzlib.c
index
94f0b80
..
05fa577
100644
(file)
--- a/
sshzlib.c
+++ b/
sshzlib.c
@@
-38,6
+38,7
@@
*/
#include <stdlib.h>
*/
#include <stdlib.h>
+#include <string.h>
#include <assert.h>
#ifdef ZLIB_STANDALONE
#include <assert.h>
#ifdef ZLIB_STANDALONE
@@
-224,6
+225,7
@@
static void lz77_compress(struct LZ77Context *ctx,
}
st->npending -= i;
}
st->npending -= i;
+ defermatch.distance = 0; /* appease compiler */
defermatch.len = 0;
deferchr = '\0';
while (len > 0) {
defermatch.len = 0;
deferchr = '\0';
while (len > 0) {
@@
-1258,6
+1260,8
@@
int zlib_decompress_block(void *handle, unsigned char *block, int len,
goto finished;
nlen = dctx->bits & 0xFFFF;
EATBITS(16);
goto finished;
nlen = dctx->bits & 0xFFFF;
EATBITS(16);
+ if (dctx->uncomplen != (nlen ^ 0xFFFF))
+ goto decode_error;
if (dctx->uncomplen == 0)
dctx->state = OUTSIDEBLK; /* block is empty */
else
if (dctx->uncomplen == 0)
dctx->state = OUTSIDEBLK; /* block is empty */
else
@@
-1368,6
+1372,7
@@
int main(int argc, char **argv)
const struct ssh_compress ssh_zlib = {
"zlib",
const struct ssh_compress ssh_zlib = {
"zlib",
+ "zlib@openssh.com", /* delayed version */
zlib_compress_init,
zlib_compress_cleanup,
zlib_compress_block,
zlib_compress_init,
zlib_compress_cleanup,
zlib_compress_block,