Describe the bug
nix-prefetch-url --unpack crashes if given a zero size file as input using the file protocol.
Steps To Reproduce
$ touch foo
$ nix-prefetch-url --unpack file://$PWD/foo
Segmentation fault (core dumped) nix-prefetch-url --unpack file://$PWD/foo
Expected behavior
Segmentation fault should never occur regardless of input values.
Metadata
nix-env (Nix) 2.31.2
Platform: aarch64
nixpkgs commit: d351d0653aeb7877273920cd3e823994e7579b0b
Additional context
Checklist
Add 👍 to issues you find important.