From 7084c7521db8508c09624345700f4c8a83a97c01 Mon Sep 17 00:00:00 2001 From: "rhyskidd@gmail.com" Date: Mon, 16 Jul 2012 15:54:06 +0000 Subject: =?UTF-8?q?PVS-Studio=20fix:=20V618=20It=E2=80=99s=20dangerous=20t?= =?UTF-8?q?o=20call=20the=20'sprintf=5Fs'=20function=20in=20such=20a=20man?= =?UTF-8?q?ner,=20as=20the=20line=20being=20passed=20could=20contain=20for?= =?UTF-8?q?mat=20specification.=20The=20example=20of=20the=20safe=20code:?= =?UTF-8?q?=20printf("%s",=20str);?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Stars45/NavDlg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Stars45/NavDlg.cpp') diff --git a/Stars45/NavDlg.cpp b/Stars45/NavDlg.cpp index 7ddd3cd..898636a 100644 --- a/Stars45/NavDlg.cpp +++ b/Stars45/NavDlg.cpp @@ -765,7 +765,7 @@ NavDlg::UpdateSelection() sprintf_s(shield, "%03d", sel_ship->ShieldStrength()); sprintf_s(hull, "%03d", sel_ship->HullStrength()); - sprintf_s(range, Game::GetText("NavDlg.not-avail").data()); + sprintf_s(range, "%s", Game::GetText("NavDlg.not-avail").data()); if (ship) { FormatNumberExp(range, Point(sel_ship->Location()-ship->Location()).length()/1000); -- cgit v1.1