tier1: fix possible unsafe read in lzss SafeUncompress, make tests pass under asan

This commit is contained in:
nillerusr
2023-04-07 14:59:36 +03:00
parent 4f063c4053
commit 92028d4e80
7 changed files with 115 additions and 25 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ public:
unsigned char* CompressNoAlloc( const unsigned char *pInput, int inputlen, unsigned char *pOutput, unsigned int *pOutputSize );
unsigned int Uncompress( const unsigned char *pInput, unsigned char *pOutput );
//unsigned int Uncompress( unsigned char *pInput, CUtlBuffer &buf );
unsigned int SafeUncompress( const unsigned char *pInput, unsigned char *pOutput, unsigned int unBufSize );
unsigned int SafeUncompress( const unsigned char *pInput, unsigned int inputSize, unsigned char *pOutput, unsigned int unBufSize );
static bool IsCompressed( const unsigned char *pInput );
static unsigned int GetActualSize( const unsigned char *pInput );