forked from lix-project/lix
Merge pull request #4008 from aszlig/fix-ub-in-reading-ca-map
Fix unspecified behaviour in readStorePathCAMap
This commit is contained in:
commit
8ebd10664e
|
@ -43,8 +43,11 @@ StorePathCAMap readStorePathCAMap(const Store & store, Source & from)
|
||||||
{
|
{
|
||||||
StorePathCAMap paths;
|
StorePathCAMap paths;
|
||||||
auto count = readNum<size_t>(from);
|
auto count = readNum<size_t>(from);
|
||||||
while (count--)
|
while (count--) {
|
||||||
paths.insert_or_assign(store.parseStorePath(readString(from)), parseContentAddressOpt(readString(from)));
|
auto path = store.parseStorePath(readString(from));
|
||||||
|
auto ca = parseContentAddressOpt(readString(from));
|
||||||
|
paths.insert_or_assign(path, ca);
|
||||||
|
}
|
||||||
return paths;
|
return paths;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue