mirror of
https://github.com/pygos/pkg-utils.git
synced 2024-11-21 20:39:46 +01:00
fix: flush SquashFS meta block if *exactely* filled
Otherwise we can get really funky corner cases where an inode offset is indicated as just 1 byte after the end of a block. The unsquashfs program doesn't complain but the kernel implementation really doesn't like that. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
7a70868fcd
commit
ed6841ed17
1 changed files with 3 additions and 0 deletions
|
@ -85,5 +85,8 @@ int meta_writer_append(meta_writer_t *m, const void *data, size_t size)
|
|||
data = (const char *)data + diff;
|
||||
}
|
||||
|
||||
if (m->offset == (sizeof(m->data) - 2))
|
||||
return meta_writer_flush(m);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue