Skip to content

nix-prefetch-url --unpack segfaults with zero sized file as input #15116

@bmellstrom

Description

@bmellstrom

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions