mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 19:24:40 +00:00
Fix read bytes check for CICM metadata block length
This commit is contained in:
@@ -366,7 +366,7 @@ void process_cicm_block(aaruformatContext *ctx, const IndexEntry *entry)
|
|||||||
entry->offset + sizeof(CicmMetadataBlock));
|
entry->offset + sizeof(CicmMetadataBlock));
|
||||||
read_bytes = fread(ctx->cicmBlock, 1, ctx->cicmBlockHeader.length, ctx->imageStream);
|
read_bytes = fread(ctx->cicmBlock, 1, ctx->cicmBlockHeader.length, ctx->imageStream);
|
||||||
|
|
||||||
if(read_bytes != ctx->metadataBlockHeader.blockSize)
|
if(read_bytes != ctx->cicmBlockHeader.length)
|
||||||
{
|
{
|
||||||
memset(&ctx->cicmBlockHeader, 0, sizeof(CicmMetadataBlock));
|
memset(&ctx->cicmBlockHeader, 0, sizeof(CicmMetadataBlock));
|
||||||
free(ctx->cicmBlock);
|
free(ctx->cicmBlock);
|
||||||
|
|||||||
Reference in New Issue
Block a user