diff options
| author | Michael Biebl <biebl@debian.org> | 2023-02-10 11:50:34 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2023-02-10 11:50:34 +0100 |
| commit | 1372848511cb896b80b51ed1a3e9606bd9816631 (patch) | |
| tree | 674792b9385bdef935988894b45f06b2af39f88c /src/libnm-glib-aux/nm-ref-string.c | |
| parent | 40ec077ea305994c1fc2130add6787ca0c73e2c6 (diff) | |
New upstream version 1.42.0 upstream/1.42.0
Diffstat (limited to 'src/libnm-glib-aux/nm-ref-string.c')
| -rw-r--r-- | src/libnm-glib-aux/nm-ref-string.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libnm-glib-aux/nm-ref-string.c b/src/libnm-glib-aux/nm-ref-string.c index fec5d60e..27a6c938 100644 --- a/src/libnm-glib-aux/nm-ref-string.c +++ b/src/libnm-glib-aux/nm-ref-string.c @@ -157,8 +157,7 @@ nm_ref_string_new_len(const char *cstr, gsize len) g_atomic_int_inc(&rstr->_ref_count); } else { rstr = g_malloc((G_STRUCT_OFFSET(NMRefString, str) + 1u) + len); - if (len > 0) - memcpy((char *) rstr->str, cstr, len); + nm_memcpy((char *) rstr->str, cstr, len); ((char *) rstr->str)[len] = '\0'; *((gsize *) &rstr->len) = len; rstr->_ref_count = 1; |