diff options
author | Thomas Haller <thaller@redhat.com> | 2021-04-21 08:10:36 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2021-04-21 08:10:36 +0200 |
commit | 9eac9c846c6bb7b0baa77b72638aaf79df4a5ca6 (patch) | |
tree | 922de56b481620cb146964478a7d41213a300255 | |
parent | 4cbf30c5ece7f0400fa26ccc0da5ed378352aa97 (diff) | |
download | NetworkManager-9eac9c846c6bb7b0baa77b72638aaf79df4a5ca6.tar.gz |
platform: fix using static buffer for logging in link_change_flags()
No need to make code intentionally not thread-safe.
-rw-r--r-- | src/libnm-platform/nm-linux-platform.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libnm-platform/nm-linux-platform.c b/src/libnm-platform/nm-linux-platform.c index 0ee3a227ea..abd629f40f 100644 --- a/src/libnm-platform/nm-linux-platform.c +++ b/src/libnm-platform/nm-linux-platform.c @@ -7470,13 +7470,14 @@ link_change_flags(NMPlatform *platform, int ifindex, unsigned flags_mask, unsign { nm_auto_nlmsg struct nl_msg *nlmsg = NULL; char s_flags[100]; + char s_flags2[100]; _LOGD("link: change %d: flags: set 0x%x/0x%x ([%s] / [%s])", ifindex, flags_set, flags_mask, nm_platform_link_flags2str(flags_set, s_flags, sizeof(s_flags)), - nm_platform_link_flags2str(flags_mask, NULL, 0)); + nm_platform_link_flags2str(flags_mask, s_flags2, sizeof(s_flags2))); nlmsg = _nl_msg_new_link_full(RTM_NEWLINK, 0, ifindex, NULL, AF_UNSPEC, flags_mask, flags_set); if (!nlmsg) |