Fix bug introduced when adding Joliet that causes libisofs to hang.

It causes an attempt to read an extra block from ring buffer to overwrite 
buffer, which causes libisofs to hang. The problem is that Volume Descriptor
Set terminator should not be read from buffer, but generated instead.
This commit is contained in:
Vreixo Formoso 2008-01-09 18:57:47 +01:00
parent ad65cc4d45
commit 51df8c6284
2 changed files with 7 additions and 3 deletions

View File

@ -35,8 +35,10 @@ int main(int argc, char **argv)
Ecma119WriteOpts opts = {
1, /* level */
1, /* rockridge */
0, /* joliet */
0, /* omit_version_numbers */
0, /* allow_deep_paths */
0, /* joliet_longer_paths */
1, /* sort files */
0, /* replace_dir_mode */
0, /* replace_file_mode */
@ -89,6 +91,7 @@ int main(int argc, char **argv)
drive = drives[0].drive;
#ifdef ISO_GROW_CHECK_MEDIA
{
/* some check before going on */
enum burn_disc_status state;
@ -109,6 +112,7 @@ int main(int argc, char **argv)
goto exit_cleanup;
}
}
#endif
/* create the data source to accesss previous image */
src = libburn_data_source_new(drive);

View File

@ -912,11 +912,11 @@ int ecma119_image_new(IsoImage *src, Ecma119WriteOpts *opts, Ecma119Image **img)
}
}
voldesc_size = target->curblock - target->ms_block - 16;
/* Volume Descriptor Set Terminator */
target->curblock++;
voldesc_size = target->curblock - target->ms_block - 16;
/*
* Create the writer for possible padding to ensure that in case of image
* growing we can safety overwrite the first 64 KiB of image.