From ad55f888597c7acb62643671dbc5eadc5d561321 Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Sat, 26 Aug 2006 09:27:39 +0000 Subject: [PATCH] Fixed crash when using joliet+rockridge --- trunk/libisofs/ecma119.c | 2 +- trunk/libisofs/joliet.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/trunk/libisofs/ecma119.c b/trunk/libisofs/ecma119.c index 2ad3a0d9..5a2b2fc5 100755 --- a/trunk/libisofs/ecma119.c +++ b/trunk/libisofs/ecma119.c @@ -612,7 +612,7 @@ ecma119_start_chunking(struct ecma119_write_target *t, off_t data_size, uint8_t *buf) { - if (data_size > t->state_data_size) { + if (data_size != t->state_data_size) { data_size = round_up(data_size, t->block_size); t->state_data = realloc(t->state_data, data_size); t->state_data_size = data_size; diff --git a/trunk/libisofs/joliet.c b/trunk/libisofs/joliet.c index 3f71a2ad..82ec0ff3 100644 --- a/trunk/libisofs/joliet.c +++ b/trunk/libisofs/joliet.c @@ -212,7 +212,6 @@ write_one_dir_record(struct ecma119_write_target *t, iso_bb(rec->vol_seq_number, t->volnum + 1, 2); rec->len_fi[0] = len_fi; memcpy(rec->file_id, name, len_fi); - } static void @@ -304,6 +303,8 @@ write_dirs(struct ecma119_write_target *t, uint8_t *buf) { size_t i; struct joliet_tree_node *dir; + + assert (t->curblock == t->dirlist_joliet[0]->block); for (i = 0; i < t->dirlist_len; i++) { dir = t->dirlist_joliet[i]; write_one_dir(t, dir, buf);