summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-09-28 12:09:51 +0200
committerThomas Haller <thaller@redhat.com>2022-10-03 17:57:46 +0200
commitf849426b84c196d71f6d6258336b3edfae3696da (patch)
tree1898a646ca816410f5fcc85731ec3702736152eb
parent168bc7f120711780049e8005fb168e69d5631570 (diff)
downloadNetworkManager-f849426b84c196d71f6d6258336b3edfae3696da.tar.gz
glib-aux: avoid leaking secrets in memory during nm_uuid_generate_from_strings_strv()
Some snake oil, but this is a low level function and we don't know whether the caller doesn't try to hash secret information. Just clear the buffer after use.
-rw-r--r--src/libnm-glib-aux/nm-uuid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libnm-glib-aux/nm-uuid.c b/src/libnm-glib-aux/nm-uuid.c
index 979f91ea9f..d7ba706e2f 100644
--- a/src/libnm-glib-aux/nm-uuid.c
+++ b/src/libnm-glib-aux/nm-uuid.c
@@ -467,7 +467,7 @@ nm_uuid_generate_from_strings_strv(NMUuidType uuid_type,
const NMUuid *type_args,
const char *const *strv)
{
- nm_auto_str_buf NMStrBuf str = NM_STR_BUF_INIT_A(NM_UTILS_GET_NEXT_REALLOC_SIZE_232, FALSE);
+ nm_auto_str_buf NMStrBuf str = NM_STR_BUF_INIT_A(NM_UTILS_GET_NEXT_REALLOC_SIZE_232, TRUE);
gsize slen;
const char *s;