summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-07-30 15:34:15 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-07-30 15:34:15 -0700
commit9b93141dd0f39af70a867231ce8ba7cb34cd23e6 (patch)
treec5dce4f0c2804441d2bc354515c8202ab23f7f58 /node
parent59ebc9d41e4e4dfabe00155c75f686f8a257541c (diff)
downloadinfinitytier-9b93141dd0f39af70a867231ce8ba7cb34cd23e6.tar.gz
infinitytier-9b93141dd0f39af70a867231ce8ba7cb34cd23e6.zip
Upgrade LZ4 to latest version.
Diffstat (limited to 'node')
-rw-r--r--node/Packet.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/node/Packet.hpp b/node/Packet.hpp
index a569cde3..ddafe4ee 100644
--- a/node/Packet.hpp
+++ b/node/Packet.hpp
@@ -993,7 +993,7 @@ public:
if ((compressed())&&(size() >= ZT_PROTO_MIN_PACKET_LENGTH)) {
if (size() > ZT_PACKET_IDX_PAYLOAD) {
unsigned int compLen = size() - ZT_PACKET_IDX_PAYLOAD;
- int ucl = LZ4_uncompress_unknownOutputSize((const char *)field(ZT_PACKET_IDX_PAYLOAD,compLen),(char *)buf,compLen,sizeof(buf));
+ int ucl = LZ4_decompress_safe((const char *)field(ZT_PACKET_IDX_PAYLOAD,compLen),(char *)buf,compLen,sizeof(buf));
if ((ucl > 0)&&(ucl <= (int)(capacity() - ZT_PACKET_IDX_PAYLOAD))) {
setSize((unsigned int)ucl + ZT_PACKET_IDX_PAYLOAD);
memcpy(field(ZT_PACKET_IDX_PAYLOAD,(unsigned int)ucl),buf,ucl);