diff --git a/util/cbfstool/lz4/lib/lz4frame.c b/util/cbfstool/lz4/lib/lz4frame.c index aef508d8df..15673d4ca6 100644 --- a/util/cbfstool/lz4/lib/lz4frame.c +++ b/util/cbfstool/lz4/lib/lz4frame.c @@ -64,6 +64,7 @@ You can contact the author at : #include "lz4hc.h" #include "xxhash.h" +#include /************************************** * Basic Types @@ -930,6 +931,10 @@ LZ4F_errorCode_t LZ4F_getFrameInfo(LZ4F_decompressionContext_t dCtx, LZ4F_frameI { LZ4F_dctx_t* dctxPtr = (LZ4F_dctx_t*)dCtx; + assert(dCtx != NULL); + if (frameInfoPtr == NULL || srcSizePtr == NULL) + return (size_t)-LZ4F_ERROR_srcPtr_wrong; + if (dctxPtr->dStage > dstage_storeHeader) /* note : requires dstage_* header related to be at beginning of enum */ { size_t o=0, i=0;