Fixed crash when using joliet+rockridge

This commit is contained in:
Mario Danic 2006-08-26 09:27:39 +00:00
parent c9ad5997d0
commit 610b731872
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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);