From 737b5f81acb23724ea088bdf4ea1b8c64f9a86e4 Mon Sep 17 00:00:00 2001 From: hvlad Date: Wed, 13 Jan 2016 09:35:23 +0000 Subject: [PATCH] IPv6 address could contain percent sign inside, therefore make sure error string not used as vfprintf format string by gds__log(). See also comments at CORE-2493. --- src/remote/inet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/remote/inet.cpp b/src/remote/inet.cpp index 2ae411c713..28e5b221f9 100644 --- a/src/remote/inet.cpp +++ b/src/remote/inet.cpp @@ -2488,7 +2488,9 @@ static void inet_error(bool releasePort, rem_port* port, const TEXT* function, I err.append(port->port_user_name); } - gds__log(err.c_str()); + // Address could contain percent sign inside, therefore make + // sure error string not used as printf format string. + gds__log("%s", err.c_str()); } inet_gen_error(releasePort, port, Arg::Gds(operation) << SYS_ERR(status));