mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-12-29 11:52:59 +08:00
skip address read oob in lz4 for now
This commit is contained in:
parent
92a768ce0e
commit
fdac4da302
3 changed files with 7 additions and 6 deletions
|
@ -322,6 +322,8 @@ static void LZ4_write32(void *memPtr, U32 value) { *(U32 *)memPtr = value; }
|
||||||
typedef union { U16 u16; U32 u32; reg_t uArch; } __attribute__((packed)) unalign;
|
typedef union { U16 u16; U32 u32; reg_t uArch; } __attribute__((packed)) unalign;
|
||||||
|
|
||||||
static U16 LZ4_read16(const void *ptr) { return ((const unalign *)ptr)->u16; }
|
static U16 LZ4_read16(const void *ptr) { return ((const unalign *)ptr)->u16; }
|
||||||
|
// Tolerate reads on buffer boundary
|
||||||
|
ATTRIBUTE_NO_SANITIZE_ADDRESS
|
||||||
static U32 LZ4_read32(const void *ptr) { return ((const unalign *)ptr)->u32; }
|
static U32 LZ4_read32(const void *ptr) { return ((const unalign *)ptr)->u32; }
|
||||||
static reg_t LZ4_read_ARCH(const void *ptr) { return ((const unalign *)ptr)->uArch; }
|
static reg_t LZ4_read_ARCH(const void *ptr) { return ((const unalign *)ptr)->uArch; }
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,11 @@ extern "C" {
|
||||||
/* --- Dependency --- */
|
/* --- Dependency --- */
|
||||||
#include <stddef.h> /* size_t */
|
#include <stddef.h> /* size_t */
|
||||||
|
|
||||||
|
#if defined(__clang__) || defined (__GNUC__)
|
||||||
|
# define ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
|
||||||
|
#else
|
||||||
|
# define ATTRIBUTE_NO_SANITIZE_ADDRESS
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Introduction
|
Introduction
|
||||||
|
|
|
@ -61,12 +61,6 @@
|
||||||
# pragma clang diagnostic ignored "-Wunused-function"
|
# pragma clang diagnostic ignored "-Wunused-function"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__clang__) || defined (__GNUC__)
|
|
||||||
# define ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
|
|
||||||
#else
|
|
||||||
# define ATTRIBUTE_NO_SANITIZE_ADDRESS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*=== Enums ===*/
|
/*=== Enums ===*/
|
||||||
typedef enum { noDictCtx, usingDictCtxHc } dictCtx_directive;
|
typedef enum { noDictCtx, usingDictCtxHc } dictCtx_directive;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue