Mercurial > dropbear
diff packet.c @ 1511:5916af64acd4 fuzz
merge from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 17 Feb 2018 19:29:51 +0800 |
parents | 27e65d3aed5f fdae6fae00af |
children | 2f64cb3d3007 |
line wrap: on
line diff
--- a/packet.c Tue Jan 23 23:27:40 2018 +0800 +++ b/packet.c Sat Feb 17 19:29:51 2018 +0800 @@ -50,7 +50,7 @@ #define ZLIB_COMPRESS_EXPANSION (((RECV_MAX_PAYLOAD_LEN/16384)+1)*5 + 6) #define ZLIB_DECOMPRESS_INCR 1024 #ifndef DISABLE_ZLIB -static buffer* buf_decompress(buffer* buf, unsigned int len); +static buffer* buf_decompress(const buffer* buf, unsigned int len); static void buf_compress(buffer * dest, buffer * src, unsigned int len); #endif @@ -345,10 +345,6 @@ ses.payload = ses.readbuf; ses.payload_beginning = ses.payload->pos; buf_setlen(ses.payload, ses.payload->pos + len); - /* copy payload */ - //ses.payload = buf_new(len); - //memcpy(ses.payload->data, buf_getptr(ses.readbuf, len), len); - //buf_incrlen(ses.payload, len); } ses.readbuf = NULL; @@ -393,7 +389,7 @@ #ifndef DISABLE_ZLIB /* returns a pointer to a newly created buffer */ -static buffer* buf_decompress(buffer* buf, unsigned int len) { +static buffer* buf_decompress(const buffer* buf, unsigned int len) { int result; buffer * ret;