diff options
author | jkim <jkim@FreeBSD.org> | 2015-08-05 08:00:12 +0800 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2015-08-05 08:00:12 +0800 |
commit | efc278cea241cae87ff77ec82f41f76ca082fa07 (patch) | |
tree | c6b4facf69281744b87b17d8bda3bc1ac32abe0b /x11/xpra | |
parent | 557ceca094846e8ec73f0ac14173a3a7b1cb06c8 (diff) | |
download | freebsd-ports-gnome-efc278cea241cae87ff77ec82f41f76ca082fa07.tar.gz freebsd-ports-gnome-efc278cea241cae87ff77ec82f41f76ca082fa07.tar.zst freebsd-ports-gnome-efc278cea241cae87ff77ec82f41f76ca082fa07.zip |
Revert an upstream patch to fix LZ4 compression.
Diffstat (limited to 'x11/xpra')
-rw-r--r-- | x11/xpra/files/patch-xpra_net_compression.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/x11/xpra/files/patch-xpra_net_compression.py b/x11/xpra/files/patch-xpra_net_compression.py new file mode 100644 index 000000000000..51f87fc4e265 --- /dev/null +++ b/x11/xpra/files/patch-xpra_net_compression.py @@ -0,0 +1,26 @@ +--- xpra/net/compression.py.orig 2015-07-27 14:25:13 UTC ++++ xpra/net/compression.py +@@ -23,7 +23,9 @@ try: + return level | LZ4_FLAG, LZ4_compress(packet) + #try to figure out the version number: + if hasattr(lz4, "VERSION"): +- lz4_version = str(lz4.VERSION) ++ lz4_version = lz4.VERSION ++ if hasattr(lz4, "LZ4_VERSION"): ++ lz4_version.append(lz4.LZ4_VERSION) + elif hasattr(lz4, "__file__"): + #hack it.. + import os.path +@@ -44,10 +46,8 @@ try: + #we want at least two numbers first: + if len(tmpv)>=2: + #ie: (0, 7, 0) +- lz4_version = ".".join(tmpv) +- assert lz4_version>="0.7", "versions older than 0.7.0 are vulnerable and should not be used, see CVE-2014-4715" +- if hasattr(lz4, "LZ4_VERSION"): +- lz4_version += "."+str(lz4.LZ4_VERSION) ++ lz4_version = tuple(tmpv) ++ assert lz4_version>=(0, 7), "versions older than 0.7.0 are vulnerable and should not be used, see CVE-2014-4715" + except Exception as e: + log("lz4 not found: %s", e) + LZ4_uncompress = None |