From 51df8c6284faeab8102723aead9d0436f4b26342 Mon Sep 17 00:00:00 2001 From: Vreixo Formoso Date: Wed, 9 Jan 2008 18:57:47 +0100 Subject: [PATCH] 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. --- demo/iso_grow.c | 6 +++++- src/ecma119.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/demo/iso_grow.c b/demo/iso_grow.c index a89dec9..02e9cbf 100644 --- a/demo/iso_grow.c +++ b/demo/iso_grow.c @@ -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 */ @@ -88,7 +90,8 @@ 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); diff --git a/src/ecma119.c b/src/ecma119.c index dbf9793..5aa44a5 100644 --- a/src/ecma119.c +++ b/src/ecma119.c @@ -911,12 +911,12 @@ int ecma119_image_new(IsoImage *src, Ecma119WriteOpts *opts, Ecma119Image **img) goto target_cleanup; } } + + 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.