Commit 130768c
fix(sample_container): truncate file (#100)
If there is already a file in the filesystem with the same name
and it is larger than the new size we are writing, the file size
will not be truncated and we will end up with junk after the
end of the wasm buffer.
Use FS_O_TRUNC, so that the file will always be truncated
to the new size.
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>1 parent 90b0a83 commit 130768c
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
0 commit comments