]> git.ipfire.org Git - thirdparty/openvpn.git/commit
iservice: check return value of MultiByteToWideChar
authorHeiko Hund <heiko@ist.eigentlich.net>
Thu, 30 Oct 2025 19:47:31 +0000 (20:47 +0100)
committerGert Doering <gert@greenie.muc.de>
Thu, 30 Oct 2025 21:06:43 +0000 (22:06 +0100)
commitfdd4072541ba52e297c19672d3b1e7021d14bc91
tree22e2f7124029c6cfbddac4fa1190a9aada204d25
parent9fa32e66c9ec66ca05704f8e8b2fd9db7c711c50
iservice: check return value of MultiByteToWideChar

If the first call to MultiByteToWideChar returns 0, something must have
failed, because it returns the required buffer size including the
terminating zero. When it does return 0, just return NULL and indicate
that the call to utf8to16(_size) failed.

Found by ZeroPath.

Reported-By: Joshua Rogers <contact@joshua.hu>
Change-Id: I92804da010bab36cd0326759c04f955f2bda74de
Signed-off-by: Heiko Hund <heiko@ist.eigentlich.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1306
Message-Id: <20251030194736.2151-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34071.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpnserv/common.c