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.
This commit is contained in:
Thomas Haller 2022-09-28 12:09:51 +02:00
parent 168bc7f120
commit f849426b84
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -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;