diff options
-rw-r--r-- | src/libstore/nar-accessor.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/nar-accessor.cc b/src/libstore/nar-accessor.cc index ded19c05d..4cb5de744 100644 --- a/src/libstore/nar-accessor.cc +++ b/src/libstore/nar-accessor.cc @@ -52,8 +52,9 @@ struct NarIndexer : ParseSink, StringSource void preallocateContents(unsigned long long size) override { currentStart = string(s, pos, 16); + assert(size <= std::numeric_limits<size_t>::max()); members.emplace(currentPath, - NarMember{FSAccessor::Type::tRegular, isExec, pos, size}); + NarMember{FSAccessor::Type::tRegular, isExec, pos, (size_t) size}); } void receiveContents(unsigned char * data, unsigned int len) override |