summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2017-08-17 17:55:30 (GMT)
committerYann Collet <cyan@fb.com>2017-08-17 17:55:30 (GMT)
commitc10863b98e1503af90616ae99725ecd120265dfb (patch)
treeb5d6f7e6ac63283abf00011b2d0fcdda56f74621
parent1e92bb0af020095e6f33bdb72e418e5e76cdc082 (diff)
downloadlz4-1.8.0.zip
lz4-1.8.0.tar.gz
lz4-1.8.0.tar.bz2
fix : asan error in dctx, due to increased maximum frame header size, reported by Craig Youngv1.8.0
-rw-r--r--NEWS1
-rw-r--r--lib/lz4frame.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 63d53a6..e63a82f 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ API : added LZ4F_resetDecompressionContext()
API : lz4frame : negative compression levels trigger fast acceleration, request by Lawrence Chan
API : lz4frame : can control block checksum and dictionary ID
API : fix : expose obsolete decoding functions, reported by Chen Yufei
+API : experimental : lz4frame_static : new dictionary compression API
build : fix : static lib installation, by Ido Rosen
build : dragonFlyBSD, OpenBSD, NetBSD supported
build : LZ4_MEMORY_USAGE can be modified at compile time, through external define
diff --git a/lib/lz4frame.c b/lib/lz4frame.c
index e613901..3408708 100644
--- a/lib/lz4frame.c
+++ b/lib/lz4frame.c
@@ -70,7 +70,7 @@ You can contact the author at :
/*-************************************
* Debug
**************************************/
-#define LZ4_STATIC_ASSERT(c) { enum { LZ4_static_assert = 1/(int)(!!(c)) }; } /* use only *after* variable declarations */
+#define LZ4F_STATIC_ASSERT(c) { enum { LZ4F_static_assert = 1/(int)(!!(c)) }; } /* use only *after* variable declarations */
/*-************************************
@@ -212,7 +212,7 @@ LZ4F_errorCodes LZ4F_getErrorCode(size_t functionResult)
static LZ4F_errorCode_t err0r(LZ4F_errorCodes code)
{
/* A compilation error here means sizeof(ptrdiff_t) is not large enough */
- LZ4_STATIC_ASSERT(sizeof(ptrdiff_t) >= sizeof(size_t));
+ LZ4F_STATIC_ASSERT(sizeof(ptrdiff_t) >= sizeof(size_t));
return (LZ4F_errorCode_t)-(ptrdiff_t)code;
}
@@ -912,7 +912,7 @@ struct LZ4F_dctx_s {
size_t tmpOutStart;
XXH32_state_t xxh;
XXH32_state_t blockChecksum;
- BYTE header[16];
+ BYTE header[LZ4F_HEADER_SIZE_MAX];
}; /* typedef'd to LZ4F_dctx in lz4frame.h */