mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-28 23:16:14 +01:00
gkeyfile: Fix off-by-one error in calculating value length
This was harmless, as it was always +1 too long, so included the trailing nul terminator. However, upcoming changes will start to use it in a context where there is no nul terminator. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
535653eec1
commit
b07408fe5d
@ -1396,7 +1396,7 @@ g_key_file_parse_key_value_pair (GKeyFile *key_file,
|
||||
while (g_ascii_isspace (*value_start))
|
||||
value_start++;
|
||||
|
||||
value_len = line + length - value_start + 1;
|
||||
value_len = line + length - value_start;
|
||||
|
||||
value = g_strndup (value_start, value_len);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user