mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-21 06:35:04 +08:00
LZ4: silent AddressSanitizer false positive? int8_t x = 0; <= writing 2 bytes??
This commit is contained in:
parent
66d67bcd9e
commit
e90c386179
1 changed files with 10 additions and 1 deletions
|
@ -61,6 +61,12 @@
|
|||
# pragma clang diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) || defined (__GNUC__)
|
||||
# define ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
|
||||
#else
|
||||
# define ATTRIBUTE_NO_SANITIZE_ADDRESS
|
||||
#endif
|
||||
|
||||
/*=== Enums ===*/
|
||||
typedef enum { noDictCtx, usingDictCtxHc } dictCtx_directive;
|
||||
|
||||
|
@ -980,7 +986,10 @@ int LZ4_freeStreamHC(LZ4_streamHC_t *LZ4_streamHCPtr) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// Skip AddressSanitizer which breaks compilation strangely on
|
||||
// lz4/lz4hc.c: error: writing 2 bytes into a region of size 1 [-Werror=stringop-overflow=]
|
||||
// | LZ4_streamHCPtr->internal_donotuse.favorDecSpeed = 0;
|
||||
ATTRIBUTE_NO_SANITIZE_ADDRESS
|
||||
LZ4_streamHC_t *LZ4_initStreamHC(void *buffer, size_t size) {
|
||||
LZ4_streamHC_t *const LZ4_streamHCPtr = (LZ4_streamHC_t *)buffer;
|
||||
if (buffer == NULL) return NULL;
|
||||
|
|
Loading…
Reference in a new issue