Revision 2137b4cc block-dmg.c
b/block-dmg.c | ||
---|---|---|
125 | 125 |
goto dmg_close; |
126 | 126 |
chunk_count = (count-204)/40; |
127 | 127 |
new_size = sizeof(uint64_t) * (s->n_chunks + chunk_count); |
128 |
s->types = realloc(s->types, new_size/2); |
|
129 |
s->offsets = realloc(s->offsets, new_size); |
|
130 |
s->lengths = realloc(s->lengths, new_size); |
|
131 |
s->sectors = realloc(s->sectors, new_size); |
|
132 |
s->sectorcounts = realloc(s->sectorcounts, new_size); |
|
128 |
s->types = qemu_realloc(s->types, new_size/2);
|
|
129 |
s->offsets = qemu_realloc(s->offsets, new_size);
|
|
130 |
s->lengths = qemu_realloc(s->lengths, new_size);
|
|
131 |
s->sectors = qemu_realloc(s->sectors, new_size);
|
|
132 |
s->sectorcounts = qemu_realloc(s->sectorcounts, new_size);
|
|
133 | 133 |
|
134 | 134 |
for(i=s->n_chunks;i<s->n_chunks+chunk_count;i++) { |
135 | 135 |
s->types[i] = read_uint32(s->fd); |
Also available in: Unified diff