libisoburn refused to recognize ISO images smaller than 64 kB

This commit is contained in:
Thomas Schmitt 2010-04-01 14:07:59 +00:00
parent 2fc5bf7849
commit 1e4e51edfe
2 changed files with 10 additions and 6 deletions

View File

@ -1070,7 +1070,7 @@ int isoburn_read_iso_head(struct burn_drive *d, int lba,
{
unsigned char buffer[64*1024];
int ret, info_mode, capacity, role;
off_t data_count;
off_t data_count, to_read;
info_mode= flag&255;
*image_blocks= 0;
@ -1085,9 +1085,13 @@ int isoburn_read_iso_head(struct burn_drive *d, int lba,
capacity = 0x7ffffff0;
ret = 1;
}
if(ret > 0 && (off_t) capacity * (off_t) 2048 >= (off_t) (64 * 1024)) {
memset(buffer, 0, 64 * 1024);
to_read= capacity * 2048;
if(ret > 0 && to_read >= (off_t) (36 * 1024)) {
if(to_read >= (off_t) (64 * 1024))
to_read= 64 * 1024;
ret = burn_read_data(d, ((off_t) lba) * (off_t) 2048, (char *) buffer,
(off_t) 64*1024, &data_count, 2); /* no error messages */
to_read, &data_count, 2); /* no error messages */
} else
ret= 0;
if(ret<=0)

View File

@ -1 +1 @@
#define Xorriso_timestamP "2010.03.30.082405"
#define Xorriso_timestamP "2010.04.01.140653"