mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-15 01:58:06 +02:00
libnm: fix wrong variable in route attribute validation error message
The validation checks 'addr' (the extracted address portion before '/') but the error message prints 'string' (the full input including the prefix). For input like "192.168.1.999/24", the error would show the full string instead of just the invalid address part. Found by Coverity (CID: COPY_PASTE_ERROR). Fixes:539db43619('libnm: avoid heap allocation for checking valid routes in nm_ip_route_attribute_validate()') Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> (cherry picked from commit3d4ad7b4ba)
This commit is contained in:
parent
09fa1dc8b4
commit
530a8934f5
1 changed files with 1 additions and 1 deletions
|
|
@ -1401,7 +1401,7 @@ _ip_route_attribute_validate(const char *name,
|
|||
NM_CONNECTION_ERROR_FAILED,
|
||||
family == AF_INET ? _("'%s' is not a valid IPv4 address")
|
||||
: _("'%s' is not a valid IPv6 address"),
|
||||
string);
|
||||
addr);
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue