Subject: Re: [Openvpn-devel] Trying to use zlib with openvpn From: "James Yonan" Message-ID: In-Reply-To: <024f01c4438d$c50a1ac0$0100a8c0@...226...> Sender: openvpn-devel-admin@lists.sourceforge.net Errors-To: openvpn-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: Date: Wed May 26 23:27:00 2004 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Ming-Ching Tiew , openvpn-devel@lists.sourceforge.net Ming-Ching Tiew said: > > Last night after posting to openvpn-user maillist about > wanting to use zlib with OpenVPN, I had a look at the > code. It seems the compression code is well-contained > in lzo.c, I could even do a one-to-one swap of > 'LZO_COMPRESS' with zlib's 'compress' and similarly > for decompress. It get compiled and linked. I was quite > glad about that !!! > > But of course, it is not so simple, it ran and crashed with > segmentation fault. I now suspect the decompression > memory allocation is not big enough. Any clues > where else I should look at ? Make sure that you define #define LZO_EXTRA_BUFFER(len) ((len)/64 + 16 + 3) /* LZO worst case size expansion. */ for zlib. James