diff --git a/lz4.c b/lz4.c index 0979e29..8591110 100644 --- a/lz4.c +++ b/lz4.c @@ -153,6 +153,7 @@ typedef struct _U16_S #define AARCH A64 #define LZ4_COPYSTEP(s,d) A64(d) = A64(s); d+=8; s+=8; #define LZ4_COPYPACKET(s,d) LZ4_COPYSTEP(s,d) +#define LZ4_SECURECOPY(s,d,e) if (doend-COPYLENGTH) { if (cpy > oend) goto _output_error; - LZ4_WILDCOPY(ref, op, (oend-COPYLENGTH)); + LZ4_SECURECOPY(ref, op, (oend-COPYLENGTH)); while(opoend-COPYLENGTH) { if (cpy > oend) goto _output_error; - LZ4_WILDCOPY(ref, op, (oend-COPYLENGTH)); + LZ4_SECURECOPY(ref, op, (oend-COPYLENGTH)); while(op