From 27739d90ed8d295c611d4a7ad201eb6b4bc12126 Mon Sep 17 00:00:00 2001 From: dkulwin Date: Wed, 4 Nov 2015 17:55:54 -0600 Subject: [PATCH] #if out setting of compress hooks if not using ZLIB We shouldn't even try to call ssh_packet_set_compress_hooks if zlib isn't enabled. This change conditionally compiles it out. --- monitor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monitor.c b/monitor.c index 152f642..9bae4e1 100644 --- a/monitor.c +++ b/monitor.c @@ -1965,10 +1965,12 @@ monitor_init(void) mon->m_zback = mm_create(NULL, MM_MEMSIZE); mon->m_zlib = mm_create(mon->m_zback, 20 * MM_MEMSIZE); +#ifndef WIN32_ZLIB_NO /* Compression needs to share state across borders */ ssh_packet_set_compress_hooks(ssh, mon->m_zlib, (ssh_packet_comp_alloc_func *)mm_zalloc, (ssh_packet_comp_free_func *)mm_zfree); +#endif } return mon;