cron2 has uploaded a new patch set (#2) to the change originally created by d12fk. ( http://gerrit.openvpn.net/c/openvpn/+/1306?usp=email )
The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: iservice: check return value of MultiByteToWideChar ...................................................................... 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 <[email protected]> Change-Id: I92804da010bab36cd0326759c04f955f2bda74de Signed-off-by: Heiko Hund <[email protected]> Acked-by: Gert Doering <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1306 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg34071.html Signed-off-by: Gert Doering <[email protected]> --- M src/openvpnserv/common.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/06/1306/2 diff --git a/src/openvpnserv/common.c b/src/openvpnserv/common.c index e975cc7..d25d9c0 100644 --- a/src/openvpnserv/common.c +++ b/src/openvpnserv/common.c @@ -276,6 +276,10 @@ utf8to16_size(const char *utf8, int size) { int n = MultiByteToWideChar(CP_UTF8, 0, utf8, size, NULL, 0); + if (n == 0) + { + return NULL; + } wchar_t *utf16 = malloc(n * sizeof(wchar_t)); if (!utf16) { -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1306?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I92804da010bab36cd0326759c04f955f2bda74de Gerrit-Change-Number: 1306 Gerrit-PatchSet: 2 Gerrit-Owner: d12fk <[email protected]> Gerrit-Reviewer: cron2 <[email protected]> Gerrit-Reviewer: flichtenheld <[email protected]> Gerrit-Reviewer: plaisthos <[email protected]> Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
