cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1387?usp=email )
Change subject: iservice: fix buffer size in call to FormatMessage ...................................................................... iservice: fix buffer size in call to FormatMessage The buffer size is to be given in # of TCHARs according to the docs. In this case that is the number of WCHARs in the buffer. While here, remove the unused FORMAT_MESSAGE_ARGUMENT_ARRAY flag. Just to make things a bit shorter. Reported-by: [email protected] Change-Id: I4c3e5aed23d2e4c543066bb8032ad8808dcd27a8 Signed-off-by: Heiko Hund <[email protected]> Acked-by: Gert Doering <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1387 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg34583.html Signed-off-by: Gert Doering <[email protected]> --- M src/openvpnserv/interactive.c 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index 33282c63..f64c247 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -734,9 +734,8 @@ err_str = L"Unknown Win32 Error"; - if (FormatMessage(FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_ARGUMENT_ARRAY, - NULL, err, 0, buf, sizeof(buf), NULL)) + if (FormatMessageW(FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM, + NULL, err, 0, buf, _countof(buf), NULL)) { err_str = buf; } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1387?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I4c3e5aed23d2e4c543066bb8032ad8808dcd27a8 Gerrit-Change-Number: 1387 Gerrit-PatchSet: 3 Gerrit-Owner: d12fk <[email protected]> Gerrit-Reviewer: cron2 <[email protected]> Gerrit-Reviewer: plaisthos <[email protected]> Gerrit-Reviewer: selvanair <[email protected]> Gerrit-Reviewer: stipa <[email protected]> Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
