Opened 6 years ago

Closed 6 years ago

#1064 closed Bug / Defect (fixed)

IP address displayed in Windows GUI may be incorrect

Reported by: firthmj Owned by: Selva Nair
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 (3)

comment:1 Changed 6 years ago by Gert Döring

Owner: changed from Heiko Hund to Selva Nair
Status: newassigned

comment:2 Changed 6 years ago by Selva Nair

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.

comment:3 Changed 6 years ago by Selva Nair

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.