This commit is contained in:
Thomas Renninger 2026-03-29 12:29:21 +02:00 committed by GitHub
commit a9480b2d7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,6 +64,7 @@ You can contact the author at :
#include "lz4hc.h"
#include "lz4_xxhash.h"
#include <assert.h>
/**************************************
* 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;