Attention is currently required from: Arne Schwabe.
Hello Arne Schwabe,
I'd like you to do a code review.
Please visit
https://gerrit.openvpn.net/c/openvpn/+/2110?usp=email
to review the following change.
Change subject: openvpnserv: don't use registry default as format string
......................................................................
openvpnserv: don't use registry default as format string
GetRegString() passed default_value, which is built from the install
path, as the swprintf() format, so a '%' in the path was interpreted
as a conversion. Print it with "%ls" and treat only a negative
return as failure.
Format string use introduced in b1263b06 ("Ensure strings read from
registry are null-terminated").
Change-Id: Ib53e82554712d881b1e24f6f3a2f8fbb702951bd
Signed-off-by: Razvan Cojocaru <[email protected]>
---
M src/openvpnserv/common.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/10/2110/1
diff --git a/src/openvpnserv/common.c b/src/openvpnserv/common.c
index 7a23d41..671ddde 100644
--- a/src/openvpnserv/common.c
+++ b/src/openvpnserv/common.c
@@ -38,7 +38,7 @@
if (status == ERROR_FILE_NOT_FOUND && default_value)
{
size_t len = size / sizeof(data[0]);
- if (swprintf(data, len, default_value))
+ if (swprintf(data, len, L"%ls", default_value) >= 0)
{
status = ERROR_SUCCESS;
}
--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2110?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib53e82554712d881b1e24f6f3a2f8fbb702951bd
Gerrit-Change-Number: 2110
Gerrit-PatchSet: 1
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel