mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 05:10:17 +01:00
libnm/keyfile: fix double free in keyfile's get_bytes()
Fixes:5e7b14af03(cherry picked from commitfcf254c03a) (cherry picked from commit1c56be4090) (cherry picked from commit71e2a25a0d) (cherry picked from commitfd6acf6183)
This commit is contained in:
parent
9e82199d57
commit
11ad2a0e9e
1 changed files with 1 additions and 1 deletions
|
|
@ -751,7 +751,7 @@ get_bytes (KeyfileReaderInfo *info,
|
|||
* byte-array. The reason is that zero_terminate is there to terminate
|
||||
* *valid* strings. It's not there to terminated invalid (empty) strings.
|
||||
*/
|
||||
return g_bytes_new_take (tmp_string, 0);
|
||||
return g_bytes_new_static ("", 0);
|
||||
}
|
||||
|
||||
for (length = 0; tmp_string[length]; length++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue