mirror of
https://github.com/NixOS/nix.git
synced 2025-12-02 23:20:59 +01:00
bugfix in getInteger(const nlohmann::json &) and add bounds checks
improve error messages, too
This commit is contained in:
parent
2ec1303286
commit
788be3f964
5 changed files with 54 additions and 15 deletions
|
|
@ -176,7 +176,7 @@ NarInfo NarInfo::fromJSON(
|
|||
std::nullopt);
|
||||
|
||||
if (json.contains("downloadSize"))
|
||||
res.fileSize = getInteger(valueAt(json, "downloadSize"));
|
||||
res.fileSize = getUnsigned(valueAt(json, "downloadSize"));
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue