summaryrefslogtreecommitdiffhomepage
path: root/packet.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2018-02-17 19:29:51 +0800
committerMatt Johnston <matt@ucc.asn.au>2018-02-17 19:29:51 +0800
commit7e8094d53a1c01ac671156ff2e67157b64d01a3a (patch)
treec88345f5bdd118eb9414dff5ab5c307bb1806c57 /packet.c
parentf7a664f127d3dfde0e7c7a9ca74b1d14f9a2f983 (diff)
parentf042eb41ab0d31f8ba0c5ccc9c848ad01f08f986 (diff)
merge from main
--HG-- branch : fuzz
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/packet.c b/packet.c
index 63c813b..6349d0d 100644
--- a/packet.c
+++ b/packet.c
@@ -50,7 +50,7 @@ static int checkmac(void);
#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 @@ void decrypt_packet() {
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 @@ static int checkmac() {
#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;