engine: common: fix possible NULL dereference in LZSS_Compress

This commit is contained in:
Alibek Omarov 2024-04-04 18:41:47 +03:00
parent f995d055b5
commit dd8c66d90e

View file

@ -390,6 +390,9 @@ byte *LZSS_Compress( byte *pInput, int inputLength, uint *pOutputSize )
byte *pFinal = NULL;
lzss_state_t state;
if( !pStart )
return NULL;
memset( &state, 0, sizeof( state ));
state.window_size = LZSS_WINDOW_SIZE;