From f849426b84c196d71f6d6258336b3edfae3696da Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 28 Sep 2022 12:09:51 +0200 Subject: [PATCH] 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. --- src/libnm-glib-aux/nm-uuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;