mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
Fix segfault in builtin fetchurl with hashed mirrors + SRI hashes
This commit is contained in:
parent
5450af5d0d
commit
aec545c20b
2 changed files with 6 additions and 1 deletions
|
@ -64,7 +64,8 @@ void builtinFetchurl(const BasicDerivation & drv, const std::string & netrcData)
|
|||
try {
|
||||
if (!hasSuffix(hashedMirror, "/")) hashedMirror += '/';
|
||||
auto ht = parseHashType(getAttr("outputHashAlgo"));
|
||||
fetch(hashedMirror + printHashType(ht) + "/" + Hash(getAttr("outputHash"), ht).to_string(Base16, false));
|
||||
auto h = Hash(getAttr("outputHash"), ht);
|
||||
fetch(hashedMirror + printHashType(h.type) + "/" + h.to_string(Base16, false));
|
||||
return;
|
||||
} catch (Error & e) {
|
||||
debug(e.what());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue