SHA256
1
0
forked from pool/ocserv
ocserv/ocserv-LZ4_compress_default.patch

17 lines
541 B
Diff
Raw Permalink Normal View History

Index: ocserv-0.11.10/src/worker-http.c
===================================================================
--- ocserv-0.11.10.orig/src/worker-http.c
+++ ocserv-0.11.10/src/worker-http.c
@@ -137,7 +137,11 @@ int lz4_compress(void *dst, int dstlen,
{
/* we intentionally restrict output to srclen so that
* compression fails early for packets that expand. */
+#ifdef LZ4_COMPRESS_DEFAULT
return LZ4_compress_default(src, dst, srclen, srclen);
+#else
+ return LZ4_compress_limitedOutput(src, dst, srclen, srclen);
+#endif
}
#endif