]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix too early argv freeing when registering DNS
authorDomagoj Pensa <domagoj@pensa.hr>
Tue, 15 Dec 2020 17:16:00 +0000 (18:16 +0100)
committerGert Doering <gert@greenie.muc.de>
Tue, 15 Dec 2020 19:17:34 +0000 (20:17 +0100)
commit2f2df474158b6c24325a47334fc8b5eb77a69b85
tree9620229037394047e8727d1dbfacf1b964a4d765
parent97af8b3101af6a1f8fef778d2c9e0e5f13d2d440
Fix too early argv freeing when registering DNS

When registering DNS on Windows, argv is freed after being used in first
ipconfig command (/flushdns).

Then same argv is used uninitialized in next ipconfig command
(/registerdns)
causing heap exception and subprocess crash.

As a consequence second command is never executed and locked netcmd
semaphore is not cleanly released.

Removing argv freeing between ipconfig calls solves the problem.

This issue was introduced in commit 870e240 (argv: do fewer memory
re-allocations). After a quick glance at commit no similar problem was
spotted in rest of the argv related changes.

Signed-off-by: Domagoj Pensa <domagoj@pensa.hr>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20201215171600.25534-1-domagoj@pensa.hr>
URL: https://www.mail-archive.com/search?l=mid&q=20201215171600.25534-1-domagoj@pensa.hr
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit ab4688e3bd78d010ccc96adec66ab552bd009328)
src/openvpn/tun.c