Ludovic Courtès f9b1bb916c
daemon: Read substitute nar size as 'unsigned long long'.
Fixes <https://issues.guix.gnu.org/46212>.
Reported by Christopher Baines <mail@cbaines.net>.

Previously, the nar size returned by 'guix substitute' would be read as
an 'int'; thus, values above 2^31 - 1 would be read and then stored as
negative integers in the database.

Regression introduced in 9dfa20a22ae0be3d3b01a7b3d422af97428c627e.

* nix/libstore/build.cc (SubstitutionGoal::finished): Use templatized
'string2Int' instead of 'std::atoi' to get an 'unsigned long long',
which is the type of 'hash.second'.
* tests/store.scm ("substitute and large size"): New test.
2021-11-25 00:17:21 +01:00
..
2020-05-04 09:56:12 +02:00
2020-12-21 17:47:35 +01:00
2020-05-04 09:56:12 +02:00
2020-05-04 09:56:12 +02:00
2020-05-04 09:56:12 +02:00
2020-06-05 22:54:06 +02:00
2020-06-05 22:54:06 +02:00
2021-03-06 11:41:48 +01:00
2021-11-16 14:34:28 +01:00
2021-09-18 19:37:45 +02:00
2020-12-09 22:25:17 +01:00
2021-09-28 22:00:47 +02:00
2021-09-21 15:15:52 +02:00
2021-04-12 18:42:22 +02:00
2021-05-16 23:28:11 +02:00
2021-08-12 12:34:13 +02:00
2020-05-04 09:56:12 +02:00