Files
craft-libs/crates/update
Dylan M. Taylor 208171b920 update: stage replacements exclusively and refuse oversized tar metadata (#563)
* update: stage replacements exclusively and refuse oversized tar metadata

- self_update: stage_copy creates the staged file beside the target with
  an unpredictable name (tempfile, O_EXCL) and writes bytes and mode
  through the handle, for both the AppImage and the tarball standalone
  replacement; a link at the old .<name>.update names is never followed.
- install::tree::unpack: check_metadata walks the tar headers first and
  refuses PAX or GNU long-name records over 1 MiB, which the tar crate
  buffers whole before the entry loop sees a size; both passes read at
  most MAX_TAR_BYTES of decompressed stream.

* address review: refuse size-truncated update archives, fixed staging prefix
2026-11-11 05:36:05 -05:00
..