Files
lix/tests/functional
git@71rd.net 0e115a4828 libutil/args: fix crash when NIX_GET_COMPLETIONS is not a number
When assigning an a value to NIX_GET_COMPLETIONS that could not be
parsed as an integer lix would just crash, as the value was directly
passed to stoi, without handling the return value.
This change switches the parsing to use string2Int and throws an
exception if the return value is empty.

The behaviour of lix is slightly changed through, as the value of the
variable was previously parsed to an int and then assigned to a variable
of size_t.
This change in behaviour can only be observed in cases where the
value of NIX_GET_COMPLETIONS is chosen so when it overflows it would
be valid index of the provided arguments again.

Through this change the variable is parsed as a size_t and negative
values are rejected.

Change-Id: Idf7c5740274c6e07d5bb13d7e2ed32764bfc27f8
2025-05-27 22:20:22 +00:00
..
2025-03-07 07:45:08 -05:00
2024-10-05 16:21:19 +00:00
2023-12-01 12:06:43 -05:00
2024-03-29 22:57:40 -07:00
2024-03-29 22:57:40 -07:00
2024-05-06 18:56:40 +02:00
2025-05-20 13:27:04 +02:00
2024-03-29 22:57:40 -07:00
2024-03-29 22:57:40 -07:00
2025-05-20 13:27:04 +02:00
2024-03-29 22:57:40 -07:00
2025-05-20 13:27:04 +02:00
2025-03-07 07:45:08 -05:00
2024-03-29 22:57:40 -07:00
2024-08-17 15:48:10 +00:00
2024-05-28 04:20:00 +00:00