From 9a2f3d3377b82b597f00d1d8fb8ee58d141cfb95 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Fri, 9 Dec 2011 21:12:14 +0000 Subject: More string safety stuff --- Stars45/NetAdminServer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Stars45/NetAdminServer.cpp') diff --git a/Stars45/NetAdminServer.cpp b/Stars45/NetAdminServer.cpp index 7335876..4a36681 100644 --- a/Stars45/NetAdminServer.cpp +++ b/Stars45/NetAdminServer.cpp @@ -342,9 +342,9 @@ return confirm(\"Are you sure you want to ban this player?\");\n\ char addr_hex[16]; char user_stats[16]; - sprintf(addr_dotted, "%d.%d.%d.%d", a.B1(), a.B2(), a.B3(), a.B4()); - sprintf(addr_hex, "%08x", a.IPAddr()); - sprintf(user_stats, "%d / %d / %d", u->Missions(), u->Kills(), u->Losses()); + sprintf_s(addr_dotted, "%d.%d.%d.%d", a.B1(), a.B2(), a.B3(), a.B4()); + sprintf_s(addr_hex, "%08x", a.IPAddr()); + sprintf_s(user_stats, "%d / %d / %d", u->Missions(), u->Kills(), u->Losses()); content += "\n \n\ "; @@ -751,7 +751,7 @@ NetAdminServlet::GetStatLine()   Connected to "; char buffer[256]; - sprintf(buffer, "%s:%d", config->Name().data(), config->GetAdminPort()); + sprintf_s(buffer, "%s:%d", config->Name().data(), config->GetAdminPort()); line += buffer; line += "\n\ -- cgit v1.1