Opened 2 weeks ago

Last modified 9 days ago

#1064 accepted Bug / Defect

IP address displayed in Windows GUI may be incorrect

Reported by: firthmj Owned by: selvanair
Priority: minor Milestone: release 2.4.7
Component: Windows GUI Version: OpenVPN 2.4.5 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc:

Description

If you connect and are assigned an IP address with a certain number of digits (e.g. 10.20.100.10), and then reconnect and are assigned an IP address with less digits (e.g. 10.20.100.6), the display will incorrectly show a string with the extra digits from the old address appended - it would show 10.20.100.60 for this example.

Actual addresses don't match my configuration, but the lengths do.

This looks like a fairly trivial "strcpy" or equivalent error somewhere in the code, where it isn't copying / applying the terminator correctly when the string is updated.

The error is cosmetic, but it is confusing

Change History (2)

comment:1 Changed 2 weeks ago by Gert Döring

Owner: changed from Heiko Hund to selvanair
Status: newassigned

comment:2 Changed 9 days ago by selvanair

Milestone: release 2.4.7
Status: assignedaccepted

On a quick scan it seems the parsed ip address is not explicitly null-terminated that can indeed cause this behaviour. The whole buffer is cleared at the start and is long enough to never over-fill, so there is no buffer overflow concern. Will fix in next release.

Note: See TracTickets for help on using tickets.