diff options
Diffstat (limited to 'third_party/nix/src/libstore/legacy-ssh-store.cc')
-rw-r--r-- | third_party/nix/src/libstore/legacy-ssh-store.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/third_party/nix/src/libstore/legacy-ssh-store.cc b/third_party/nix/src/libstore/legacy-ssh-store.cc index abff734efc48..8ae40d0da95c 100644 --- a/third_party/nix/src/libstore/legacy-ssh-store.cc +++ b/third_party/nix/src/libstore/legacy-ssh-store.cc @@ -115,7 +115,12 @@ struct LegacySSHStore : public Store { if (GET_PROTOCOL_MINOR(conn->remoteVersion) >= 4) { auto s = readString(conn->from); - info->narHash = s.empty() ? Hash() : Hash(s); + if (s.empty()) { + info->narHash = Hash(); + } else { + auto hash_ = Hash::deserialize(s); + info->narHash = Hash::unwrap_throw(hash_); + } conn->from >> info->ca; info->sigs = readStrings<StringSet>(conn->from); } |