mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 06:20:17 +01:00
lldp: fix memchr() argument order
The validation of embedded NUL character was skipped due to the wrong order of arguments to memchr(). Fix it. Fixes:4043f82790('lldp: cleanup converting binary LLDP fields to string') (cherry picked from commitce17284c3f)
This commit is contained in:
parent
d34d564bb4
commit
051c2f8ea1
1 changed files with 1 additions and 1 deletions
|
|
@ -310,7 +310,7 @@ format_string(const guint8 *data, gsize len, gboolean allow_trim, char **out_to_
|
|||
if (len == 0)
|
||||
return NULL;
|
||||
|
||||
if (memchr(data, len, '\0'))
|
||||
if (memchr(data, '\0', len))
|
||||
return NULL;
|
||||
|
||||
return nm_utils_buf_utf8safe_escape(data,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue