Skip to content

Commit

Permalink
blah
Browse files Browse the repository at this point in the history
  • Loading branch information
ragusaa committed Aug 7, 2024
1 parent 36de7c0 commit 70237d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libclamav/ole2_extract_images.h
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ static void saveImageFile( cli_ctx * ctx, ole2_header_t * ole2Hdr, ole2_pointer_
size_t bytesWritten = 0;
FILE * fp = NULL;
static json_object * ary = NULL;
size_t totalIncrement = 0;
//size_t i = 0;

size_t blockSize = 1 << ole2Hdr->log2_big_block_size;
Expand Down Expand Up @@ -735,6 +736,7 @@ static void saveImageFile( cli_ctx * ctx, ole2_header_t * ole2Hdr, ole2_pointer_
//toWrite = reserveBlock - lastWritten;
toWrite = reserveBlock - fileOffset;
increment = blockSize;
totalIncrement += increment;
fprintf(stderr, "%s::%d::FOUND ONE at idx %ld\n", __FUNCTION__, __LINE__, difatIter);


Expand Down Expand Up @@ -798,7 +800,7 @@ static void saveImageFile( cli_ctx * ctx, ole2_header_t * ole2Hdr, ole2_pointer_
}

done:
ole2Ptr->ptr = &(ole2Ptr->ptr[size]);
ole2Ptr->ptr = &(ole2Ptr->ptr[size + totalIncrement]);

fprintf(stderr, "%s::%d::TODO: increment pointer by the blocks skipped also!!!!\n", __FUNCTION__, __LINE__);

Expand Down

0 comments on commit 70237d1

Please sign in to comment.