NetworkManager/clients
Thomas Haller 511b4ab411
cloud-setup: add and use nmcs_utils_hwaddr_normalize_gbytes()
Previously we would call

    nmcs_utils_hwaddr_normalize(g_bytes_get_data(response, NULL), -1);

which treats the data in response as NUL terminated. That is not
entirely wrong, because the HTTP request's response is guaranteed
to have a NUL termination at the end. However, it doesn't seam to good
either.

For one, we already have the length. Use it. But also, if the response
contains any NUL bytes in the middle, then this would wrongly only
consider the first line. We should not accept "00:11:22:33:44:55\0bogus"
as valid.

While at it, reject NUL characters from nmcs_utils_hwaddr_normalize() --
except one NUL at the end.
2021-01-08 16:32:48 +01:00
..
cli nmcli: change "--help" to "help" 2021-01-07 09:38:15 +01:00
cloud-setup cloud-setup: add and use nmcs_utils_hwaddr_normalize_gbytes() 2021-01-08 16:32:48 +01:00
common all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
tests Correct python black rules 2020-10-29 09:35:10 +01:00
tui all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
meson.build all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
nm-online.c all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00