fix : asan error in dctx, due to increased maximum frame header size, reported by Craig Young

This commit is contained in:
Yann Collet 2017-08-17 10:55:30 -07:00
parent 1e92bb0af0
commit c10863b98e
2 changed files with 4 additions and 3 deletions

1
NEWS
View File

@ -6,6 +6,7 @@ API : added LZ4F_resetDecompressionContext()
API : lz4frame : negative compression levels trigger fast acceleration, request by Lawrence Chan API : lz4frame : negative compression levels trigger fast acceleration, request by Lawrence Chan
API : lz4frame : can control block checksum and dictionary ID API : lz4frame : can control block checksum and dictionary ID
API : fix : expose obsolete decoding functions, reported by Chen Yufei 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 : fix : static lib installation, by Ido Rosen
build : dragonFlyBSD, OpenBSD, NetBSD supported build : dragonFlyBSD, OpenBSD, NetBSD supported
build : LZ4_MEMORY_USAGE can be modified at compile time, through external define build : LZ4_MEMORY_USAGE can be modified at compile time, through external define

View File

@ -70,7 +70,7 @@ You can contact the author at :
/*-************************************ /*-************************************
* Debug * 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) static LZ4F_errorCode_t err0r(LZ4F_errorCodes code)
{ {
/* A compilation error here means sizeof(ptrdiff_t) is not large enough */ /* 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; return (LZ4F_errorCode_t)-(ptrdiff_t)code;
} }
@ -912,7 +912,7 @@ struct LZ4F_dctx_s {
size_t tmpOutStart; size_t tmpOutStart;
XXH32_state_t xxh; XXH32_state_t xxh;
XXH32_state_t blockChecksum; XXH32_state_t blockChecksum;
BYTE header[16]; BYTE header[LZ4F_HEADER_SIZE_MAX];
}; /* typedef'd to LZ4F_dctx in lz4frame.h */ }; /* typedef'd to LZ4F_dctx in lz4frame.h */