Opened 5 years ago
Closed 4 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 5 years ago by
Owner: | changed from Heiko Hund to Selva Nair |
---|---|
Status: | new → assigned |
comment:2 Changed 5 years ago by
Milestone: | → release 2.4.7 |
---|---|
Status: | assigned → accepted |
comment:3 Changed 4 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Fixed by PR 261 (https://github.com/OpenVPN/openvpn-gui/pull/261)
Closing.
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.