mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-10 12:38:29 +02:00
dhcp: fix parsing of client id
Replace "s[1 + 2]" with "s[i + 2]".
Fixes: 8ffa22d10d ('dhcp: dhclient: set type 0 for printable client IDs')
This commit is contained in:
parent
d6e996fb14
commit
b0bdaa29c9
1 changed files with 2 additions and 2 deletions
|
|
@ -239,8 +239,8 @@ read_client_id(const char *str)
|
|||
i += 4;
|
||||
continue;
|
||||
}
|
||||
if (s[i] == '\\' && s[i + 1] >= '0' && s[i + 1] <= '7' && s[1 + 2] >= '0'
|
||||
&& s[i + 2] <= '7' && s[1 + 3] >= '0' && s[i + 3] <= '7') {
|
||||
if (s[i] == '\\' && s[i + 1] >= '0' && s[i + 1] <= '7' && s[i + 2] >= '0'
|
||||
&& s[i + 2] <= '7' && s[i + 3] >= '0' && s[i + 3] <= '7') {
|
||||
s[j++] = ((s[i + 1] - '0') << 6) + ((s[i + 2] - '0') << 3) + (s[i + 3] - '0');
|
||||
i += 4;
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue