Made Xorriso_obtain_indev_readsize() ready for long block adresses

This commit is contained in:
2024-03-21 09:44:51 +01:00
parent 5e03c659e3
commit 458b0cb3de
5 changed files with 11 additions and 9 deletions

View File

@ -2421,7 +2421,7 @@ int Xorriso_read_file_data(struct XorrisO *xorriso, IsoNode *node,
int quality, bad_extract= 0;
off_t lba, count, blocks, spot;
int data_to_skip= 0;
uint32_t indev_blocks;
off_t indev_blocks;
off_t size= 0, file_base_bytes= 0, file_processed_bytes= 0, img_adr;
off_t new_file_base_bytes, upto_file_bytes, start_byte= 0;
off_t *section_sizes = NULL;
@ -2438,7 +2438,7 @@ int Xorriso_read_file_data(struct XorrisO *xorriso, IsoNode *node,
Xorriso_alloc_meM(section_sizes, off_t, 1);
start_lbas[0]= 0;
ret= Xorriso_obtain_indev_readsize(xorriso, &indev_blocks, 0);
if(ret > 0)
if(ret > 0 && indev_blocks <= 0x7ffffffe)
end_lbas[0]= indev_blocks - 1;
else
end_lbas[0]= 0x7ffffffe;