Fixed crash when using joliet+rockridge
This commit is contained in:
parent
c9ad5997d0
commit
610b731872
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user