rpms/scorched3d/devel scorched3d-HTML-injection.patch, NONE, 1.1 scorched3d-XML-injection.patch, NONE, 1.1 scorched3d-formatstring.patch, NONE, 1.1 scorched3d-negint.patch, NONE, 1.1 scorched3d-pgsql.patch, NONE, 1.1 scorched3d-sprintf.patch, NONE, 1.1 scorched3d-strxxx.patch, NONE, 1.1 scorched3d.spec, 1.10, 1.11 scorched3d-buf.patch, 1.1, NONE

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Sat Feb 11 19:33:16 UTC 2006


Author: jwrdegoede

Update of /cvs/extras/rpms/scorched3d/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1696

Modified Files:
	scorched3d.spec 
Added Files:
	scorched3d-HTML-injection.patch scorched3d-XML-injection.patch 
	scorched3d-formatstring.patch scorched3d-negint.patch 
	scorched3d-pgsql.patch scorched3d-sprintf.patch 
	scorched3d-strxxx.patch 
Removed Files:
	scorched3d-buf.patch 
Log Message:
scorched3d-39_1-2

scorched3d-HTML-injection.patch:

--- NEW FILE scorched3d-HTML-injection.patch ---
--- scorched/src/server/ServerWebHandler.cpp.injection	2006-02-11 18:43:38.000000000 +0100
+++ scorched/src/server/ServerWebHandler.cpp	2006-02-11 19:05:51.000000000 +0100
@@ -33,6 +33,7 @@
 #include <tank/TankContainer.h>
 #include <tankai/TankAIStore.h>
 #include <tankai/TankAIAdder.h>
+#include <XML/XMLParser.h>
 
 static const char *getField(std::map<std::string, std::string> &fields, const char *field)
 {
@@ -117,6 +118,9 @@
 	for (itor = tanks.begin(); itor != tanks.end(); itor++)
 	{
 		Tank *tank = (*itor).second;
+		std::string cleanName;
+		std::string dirtyName(tank->getName());
+		XMLParser::removeSpecialChars(dirtyName, cleanName);
 		players += formatString(
 			"<tr>"
 			"<td>dest=%i ip=%s id=%i</td>" // Id
@@ -129,7 +133,7 @@
 			"<td><input type=\"checkbox\" name=\"player-%u\"></td>" // Select
 			"</tr>\n",
 			tank->getDestinationId(), NetInterface::getIpName(tank->getIpAddress()), tank->getPlayerId(),
-			tank->getName(),
+			cleanName.c_str(),
 			tank->getTankAI()?tank->getTankAI()->getName():"Human",
 			tank->getScore().getTimePlayedString(),
 			tank->getScore().getScoreString(),
@@ -178,13 +182,15 @@
 	int max = MIN((int) entries.size(), start + pagesize);
 	for (int i=min; i<max; i++)
 	{
+		std::string cleanText;
+		XMLParser::removeSpecialChars(entries[i].text, cleanText);
 		log += formatString(
 			"<tr>"
 			"<td><font size=-2>%u</font></td>"
 			"<td><font size=-2>%s</font></td>"
 			"</tr>\n",
 			i,
-			entries[i].text.c_str());
+			cleanText.c_str());
 	}
 	fields["LOG"] = log;
 
@@ -335,7 +341,9 @@
 		textsListItor != textsList.end();
 		textsListItor++)
 	{
-		texts += (*textsListItor);
+		std::string cleanText;
+		XMLParser::removeSpecialChars((*textsListItor), cleanText);
+		texts += cleanText;
 		texts += "<br>\n";
 	}
 	fields["TEXTS"] = texts;
@@ -375,11 +383,13 @@
 			if (selected && 0 == strcmp(selected, ipName.c_str()))
 				entry.type = ServerBanned::NotBanned;
 
+			std::string cleanName;
+			XMLParser::removeSpecialChars(entry.name, cleanName);
 			banned += formatString("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td>"
 				"<td><input type=\"checkbox\" name=\"selected\" value=\"%s\"></td>" // Select
 				"</tr>",
 				(entry.bantime?ctime(&entry.bantime):""),
-				entry.name.c_str(),
+				cleanName.c_str(),
 				entry.uniqueid.c_str(),
 				ServerBanned::getBannedTypeStr(entry.type),
 				ipName.c_str(), mask.c_str(),
@@ -407,8 +417,11 @@
 		itor++)
 	{
 		ModFileEntry *entry = (*itor).second;
+		std::string cleanFileName;
+		std::string dirtyFileName(entry->getFileName());
+		XMLParser::removeSpecialChars(dirtyFileName, cleanFileName);
 		modfiles += formatString("<tr><td>%s</td><td>%u</td><td>%u</td><td>%u</td></tr>",
-			entry->getFileName(), 
+			cleanFileName.c_str(),
 			entry->getCompressedSize(),
 			entry->getCompressedCrc(),
 			entry->getUncompressedSize());

scorched3d-XML-injection.patch:

--- NEW FILE scorched3d-XML-injection.patch ---
diff -ur scorched.orig/src/GLEXT/GLConsoleFileReader.cpp scorched/src/GLEXT/GLConsoleFileReader.cpp
--- scorched.orig/src/GLEXT/GLConsoleFileReader.cpp	2006-02-11 15:40:45.000000000 +0100
+++ scorched/src/GLEXT/GLConsoleFileReader.cpp	2006-02-11 15:45:05.000000000 +0100
@@ -23,6 +23,7 @@
 #include <GLEXT/GLConsole.h>
 #include <common/FileLines.h>
 #include <XML/XMLFile.h>
+#include <XML/XMLParser.h>
 #include <stdio.h>
 
 bool GLConsoleFileReader::loadFileIntoConsole(const char *fileName,
@@ -62,15 +63,18 @@
 		itor != lines.end();
 		itor++)
 	{
-		std::string string;
-		const char *line = (*itor)->getLine();
+		std::string cleanLine;
+		std::string dirtyLine((*itor)->getLine());
+		XMLParser::removeSpecialChars(dirtyLine, cleanLine);
 		if ((*itor)->getLineType() != GLConsoleLine::eNone)
 		{
-			filelines.addLine("  <command>%s</command>", line);
+			filelines.addLine("  <command>%s</command>",
+				cleanLine.c_str());
 		}
 		else
 		{
-			filelines.addLine("  <!-- %s -->", line);
+			filelines.addLine("  <!-- %s -->",
+				cleanLine.c_str());
 		}
 	}
 
Only in scorched/src/GLEXT: GLConsoleFileReader.cpp~
diff -ur scorched.orig/src/XML/XMLParser.cpp scorched/src/XML/XMLParser.cpp
--- scorched.orig/src/XML/XMLParser.cpp	2006-02-11 15:40:45.000000000 +0100
+++ scorched/src/XML/XMLParser.cpp	2006-02-11 15:39:50.000000000 +0100
@@ -25,7 +25,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-static void removeSpecialChars(std::string &content, std::string &result)
+void XMLParser::removeSpecialChars(std::string &content, std::string &result)
 {
 	result = "";
 	for (char *c=(char *) content.c_str(); *c; c++)
@@ -174,7 +174,7 @@
 			DIALOG_ASSERT(node->type_ == XMLParameterType);
 			
 			std::string newContent;
-			removeSpecialChars(node->content_, newContent);
+			XMLParser::removeSpecialChars(node->content_, newContent);
 			
 			params += " " + node->name_ + "='" + newContent + "'";
 		}
@@ -182,7 +182,7 @@
 		if (children_.empty())
 		{
 			std::string newContent;
-			removeSpecialChars(content_, newContent);
+			XMLParser::removeSpecialChars(content_, newContent);
 			
 			lines.addLine("%s<%s%s>%s</%s>", 
 				getSpacer(spacing),
diff -ur scorched.orig/src/XML/XMLParser.h scorched/src/XML/XMLParser.h
--- scorched.orig/src/XML/XMLParser.h	2006-02-11 15:40:45.000000000 +0100
+++ scorched/src/XML/XMLParser.h	2006-02-11 15:39:50.000000000 +0100
@@ -121,6 +121,9 @@
 	void setSource(const char *source) { source_ = source; }
 	XMLNode *getRoot() { return root_; }
 
+	static void removeSpecialChars(std::string &content,
+		std::string &result);
+
 protected:
 	XMLNode *root_;
 	XMLNode *current_;
diff -ur scorched.orig/src/weapons/EconomyFreeMarket.cpp scorched/src/weapons/EconomyFreeMarket.cpp
--- scorched.orig/src/weapons/EconomyFreeMarket.cpp	2006-02-11 15:40:45.000000000 +0100
+++ scorched/src/weapons/EconomyFreeMarket.cpp	2006-02-11 15:48:19.000000000 +0100
@@ -26,6 +26,7 @@
 #include <common/OptionsGame.h>
 #include <common/Logger.h>
 #include <XML/XMLFile.h>
+#include <XML/XMLParser.h>
 #include <tank/Tank.h>
 #include <stdlib.h>
 
@@ -123,8 +124,11 @@
 			accessory->getStartingNumber() != -1 && 
 			accessory->getType() == AccessoryPart::AccessoryWeapon)
 		{
+			std::string cleanName;
+			std::string dirtyName(accessory->getName());
+			XMLParser::removeSpecialChars(dirtyName, cleanName);
 			file.addLine("  <accessory>");
-			file.addLine("    <name>%s</name>", accessory->getName());
+			file.addLine("    <name>%s</name>", cleanName.c_str());
 			file.addLine("    <buyprice>%i</buyprice>", accessory->getPrice());
 			file.addLine("  </accessory>");
 		}
Only in scorched/src/weapons: EconomyFreeMarket.cpp~

scorched3d-formatstring.patch:

--- NEW FILE scorched3d-formatstring.patch ---
diff -ur scorched.orig/src/3dsparse/ModelID.cpp scorched/src/3dsparse/ModelID.cpp
--- scorched.orig/src/3dsparse/ModelID.cpp	2006-02-11 15:14:43.000000000 +0100
+++ scorched/src/3dsparse/ModelID.cpp	2006-02-11 15:21:36.000000000 +0100
@@ -77,7 +77,7 @@
 		static char meshName[1024];
 		snprintf(meshName, sizeof(meshName), "%s/%s", directory,
 			meshNameContent);
-		if (!DefinesUtil::fileExists(getDataFile(meshName)))
+		if (!DefinesUtil::fileExists(getDataFile("%s", meshName)))
 		{
 			dialogMessage("Scorched Models",
 						"Mesh file \"%s\"does not exist",
@@ -92,7 +92,7 @@
 		{
 			snprintf(skinName, sizeof(skinName), "%s/%s",
 				directory, skinNameContent);
-			if (!DefinesUtil::fileExists(getDataFile(skinName)))
+			if (!DefinesUtil::fileExists(getDataFile("%s", skinName)))
 			{
 				dialogMessage("Scorched Models",
 							"Skin file \"%s\" does not exist",
@@ -116,7 +116,7 @@
 		snprintf(meshName, sizeof(meshName), "%s/%s", directory,
 			meshNameContent);
 
-		if (!DefinesUtil::fileExists(getDataFile(meshName)))
+		if (!DefinesUtil::fileExists(getDataFile("%s", meshName)))
 		{
 			dialogMessage("Scorched Models",
 						"Mesh file \"%s\"does not exist",
Only in scorched/src/3dsparse: ModelID.cpp~
diff -ur scorched.orig/src/3dsparse/ModelStore.cpp scorched/src/3dsparse/ModelStore.cpp
--- scorched.orig/src/3dsparse/ModelStore.cpp	2005-04-12 00:19:08.000000000 +0200
+++ scorched/src/3dsparse/ModelStore.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -134,18 +134,18 @@
 	if (0 == strcmp(id.getType(), "ase"))
 	{
 		// Load the ASEFile containing the tank definitions
-		std::string meshName(getDataFile(id.getMeshName()));
+		std::string meshName(getDataFile("%s", id.getMeshName()));
 
 		bool noSkin = 
 			(0 == strcmp("none", id.getSkinName()));
 		ASEModelFactory factory;
 		model = factory.createModel(meshName.c_str(), 
-			(noSkin?"":getDataFile(id.getSkinName())));
+			(noSkin?"":getDataFile("%s", id.getSkinName())));
 	}
 	else
 	{
 		// Load the Milkshape containing the tank definitions
-		std::string meshName(getDataFile(id.getMeshName()));
+		std::string meshName(getDataFile("%s", id.getMeshName()));
 		MSModelFactory factory;
 		model = factory.createModel(meshName.c_str());		
 	}
diff -ur scorched.orig/src/3dsparse/aseFile.tab.cpp scorched/src/3dsparse/aseFile.tab.cpp
--- scorched.orig/src/3dsparse/aseFile.tab.cpp	2006-02-11 15:14:43.000000000 +0100
+++ scorched/src/3dsparse/aseFile.tab.cpp	2006-02-11 15:22:13.000000000 +0100
@@ -1057,7 +1057,7 @@
 {
 	char buffer[1024];
 	snprintf(buffer, sizeof(buffer), "%i:%s\n", aselineno, errmsg);
-	dialogMessage("Lexer", buffer);
+	dialogMessage("Lexer", "%s", buffer);
     return 0;
 }
 
@@ -1065,7 +1065,7 @@
 {
 	char buffer[1024];
 	snprintf(buffer, sizeof(buffer), "%i:%s\n", aselineno, warningmsg);
-	dialogMessage("Lexer", buffer);
+	dialogMessage("Lexer", "%s", buffer);
     return 0;
 }
 
@@ -1073,6 +1073,6 @@
 {
 	char buffer[1024];
 	snprintf(buffer, sizeof(buffer), "%i:%s\n", aselineno, debugmsg);
-	dialogMessage("Lexer", buffer);
+	dialogMessage("Lexer", "%s", buffer);
     return 0;
 }
Only in scorched/src/3dsparse: aseFile.tab.cpp~
diff -ur scorched.orig/src/GLEXT/GLConsole.cpp scorched/src/GLEXT/GLConsole.cpp
--- scorched.orig/src/GLEXT/GLConsole.cpp	2006-02-11 15:14:43.000000000 +0100
+++ scorched/src/GLEXT/GLConsole.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -53,7 +53,7 @@
 
 void GLConsole::logMessage(LoggerInfo &info)
 {
-	addLine(false, info.getMessage());
+	addLine(false, "%s", info.getMessage());
 }
 
 void GLConsole::keyboardCheck(const unsigned state, float frameTime, 
@@ -111,7 +111,7 @@
 								itor != matches.end();
 								itor++)
 							{
-								addLine(false, (*itor)->getName());
+								addLine(false, "%s", (*itor)->getName());
 							}
 						}
 					}
@@ -160,7 +160,7 @@
 			KeyboardKey *key = (*keyItor);
 			if (key->keyDown(buffer, keyState, false))
 			{
-				addLine(true, key->getName());
+				addLine(true, "%s", key->getName());
 			}
 		}
 	}
diff -ur scorched.orig/src/GLEXT/GLConsoleFileReader.cpp scorched/src/GLEXT/GLConsoleFileReader.cpp
--- scorched.orig/src/GLEXT/GLConsoleFileReader.cpp	2005-04-12 19:06:13.000000000 +0200
+++ scorched/src/GLEXT/GLConsoleFileReader.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -45,7 +45,7 @@
 		XMLNode *currentNode = (*childrenItor);		
 		if (strcmp(currentNode->getName(), "command")==0)
 		{
-			GLConsole::instance()->addLine(true, currentNode->getContent());
+			GLConsole::instance()->addLine(true, "%s", currentNode->getContent());
 		}
 	}
 	return true;
diff -ur scorched.orig/src/GLEXT/GLStateExtension.cpp scorched/src/GLEXT/GLStateExtension.cpp
--- scorched.orig/src/GLEXT/GLStateExtension.cpp	2004-09-09 20:03:49.000000000 +0200
+++ scorched/src/GLEXT/GLStateExtension.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -122,13 +122,13 @@
 // HACK for skin creator
 #ifdef dDOUBLE
 	GLConsole::instance()->addLine(false, "GL_VENDOR:");
-	GLConsole::instance()->addLine(false, (const char *) glGetString(GL_VENDOR));
+	GLConsole::instance()->addLine(false, "%s", (const char *) glGetString(GL_VENDOR));
 	GLConsole::instance()->addLine(false, "GL_RENDERER:");
-	GLConsole::instance()->addLine(false, (const char *) glGetString(GL_RENDERER));
+	GLConsole::instance()->addLine(false, "%s", (const char *) glGetString(GL_RENDERER));
 	GLConsole::instance()->addLine(false, "GL_VERSION:");
-	GLConsole::instance()->addLine(false, (const char *) glGetString(GL_VERSION));
+	GLConsole::instance()->addLine(false, "%s", (const char *) glGetString(GL_VERSION));
 	GLConsole::instance()->addLine(false, "GL_EXTENSIONS:");
-	GLConsole::instance()->addLine(false, (const char *) glGetString(GL_EXTENSIONS));
+	GLConsole::instance()->addLine(false, "%s", (const char *) glGetString(GL_EXTENSIONS));
 	GLConsole::instance()->addLine(false, "TEXTURE_UNITS:");
 	GLConsole::instance()->addLine(false, "%s (%i units)", ((glActiveTextureARB_==0)?"Off":"On"),textureUnits_);
 	GLConsole::instance()->addLine(false, "VBO:");
diff -ur scorched.orig/src/GLW/GLWDropDown.cpp scorched/src/GLW/GLWDropDown.cpp
--- scorched.orig/src/GLW/GLWDropDown.cpp	2004-06-18 01:40:41.000000000 +0200
+++ scorched/src/GLW/GLWDropDown.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -122,7 +122,7 @@
 	GLWFont::instance()->getLargePtFont()->drawWidth(
 		(int) w_ - 25,
 		GLWFont::widgetFontColor, 14,
-		x_ + 5.0f, y_ + 5.0f, 0.0f, text_.c_str());
+		x_ + 5.0f, y_ + 5.0f, 0.0f, "%s", text_.c_str());
 }
 
 void GLWDropDown::buttonDown(unsigned int id)
diff -ur scorched.orig/src/GLW/GLWIcon.cpp scorched/src/GLW/GLWIcon.cpp
--- scorched.orig/src/GLW/GLWIcon.cpp	2004-09-10 14:45:45.000000000 +0200
+++ scorched/src/GLW/GLWIcon.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -72,9 +72,9 @@
 	if (bitmapNode && bitmapANode)
 	{
 		std::string bitmapName = 
-			getDataFile(bitmapNode->getContent());
+			getDataFile("%s", bitmapNode->getContent());
 		std::string bitmapAName = 
-			getDataFile(bitmapANode->getContent());
+			getDataFile("%s", bitmapANode->getContent());
 
 		texture_ = ModelStore::instance()->loadTexture(
 			bitmapName.c_str(), bitmapAName.c_str(), invert);
diff -ur scorched.orig/src/GLW/GLWLabel.cpp scorched/src/GLW/GLWLabel.cpp
--- scorched.orig/src/GLW/GLWLabel.cpp	2005-06-20 15:15:39.000000000 +0200
+++ scorched/src/GLW/GLWLabel.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -56,7 +56,7 @@
 void GLWLabel::calcWidth()
 {
 	if (w_ == 0.0f) w_ = (float) GLWFont::instance()->getLargePtFont()->getWidth(
-		size_, (char *) buttonText_.c_str());
+		size_, "%s", (char *) buttonText_.c_str());
 }
 
 void GLWLabel::draw()
@@ -67,5 +67,5 @@
 	calcWidth();
 	GLWFont::instance()->getLargePtFont()->draw(
 		color_, size_,
-		x_, y_ + 6.0f, 0.0f, (char *) buttonText_.c_str());
+		x_, y_ + 6.0f, 0.0f, "%s", (char *) buttonText_.c_str());
 }
diff -ur scorched.orig/src/GLW/GLWLoggerView.cpp scorched/src/GLW/GLWLoggerView.cpp
--- scorched.orig/src/GLW/GLWLoggerView.cpp	2005-07-11 22:40:38.000000000 +0200
+++ scorched/src/GLW/GLWLoggerView.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -133,14 +133,14 @@
 			{
 				// Figure texture width
 				float minus = GLWFont::instance()->getLargePtFont()->
-					getWidth(fontSize_, entry.info.getMessage()) / 2.0f;
+					getWidth(fontSize_, "%s", entry.info.getMessage()) / 2.0f;
 				float x = x_ + w_ / 2.0f - minus - 1;
 				float y = start - i * lineDepth_ - 1;
 
 				// Draw outline
  				GLWFont::instance()->getSmallPtFontOutline()->
  					drawOutline(black, outlineFontSize_, fontSize_,
- 						x, y, 0.0f, 
+ 						x, y, 0.0f, "%s",
  						entry.info.getMessage());
 			}
 			else
@@ -153,15 +153,15 @@
 				float x = x_ + w_ / 2.0f;
 				float y = start - i * lineDepth_;
 				float minusSource = (float) GLWFont::instance()->getLargePtFont()->
-					getWidth(fontSize_, source->getName());
+					getWidth(fontSize_, "%s", source->getName());
 
  				GLWFont::instance()->getSmallPtFontOutline()->
  					drawOutline(black, outlineFontSize_, fontSize_,
- 						x - minusSource - outlineFontSize_ / 2.0f - 2.0f, y, 0.0f, 
+ 						x - minusSource - outlineFontSize_ / 2.0f - 2.0f, y, 0.0f, "%s",
 						source->getName());
  				GLWFont::instance()->getSmallPtFontOutline()->
  					drawOutline(black, outlineFontSize_, fontSize_,
- 						x + outlineFontSize_ / 2.0f + 2.0f, y, 0.0f, 
+ 						x + outlineFontSize_ / 2.0f + 2.0f, y, 0.0f, "%s",
 						dest->getName());
 			}
 
@@ -180,7 +180,7 @@
 			{
 				// Figure texture width
 				float minus = GLWFont::instance()->getLargePtFont()->
-					getWidth(fontSize_, entry.info.getMessage()) / 2.0f;
+					getWidth(fontSize_, "%s", entry.info.getMessage()) / 2.0f;
 				float x = x_ + w_ / 2.0f  - minus;
 				float y = start - i * lineDepth_;
 
@@ -220,19 +220,19 @@
 					GLWFont::instance()->getLargePtFont()->
 						drawSubStr(0, entry.info.getInfoLen(),
 							source?source->getColor():dColor, fontSize_,
-							x, y, 0.0f, 
+							x, y, 0.0f, "%s",
 							entry.info.getMessage());
 					GLWFont::instance()->getLargePtFont()->
 						drawSubStr(entry.info.getInfoLen(), entry.info.getMessageLen(),
 							dColor, fontSize_,
-							x, y, 0.0f, 
+							x, y, 0.0f, "%s",
 							entry.info.getMessage());
 				}
 				else
 				{
 					GLWFont::instance()->getLargePtFont()->
 						draw(dColor, fontSize_,
-							x, y, 0.0f, 
+							x, y, 0.0f, "%s",
 							entry.info.getMessage());
 				}
 			}
@@ -246,16 +246,16 @@
 				float x = x_ + w_ / 2.0f;
 				float y = start - i * lineDepth_;
 				float minusSource = (float) GLWFont::instance()->getLargePtFont()->
-					getWidth(fontSize_, source->getName());
+					getWidth(fontSize_, "%s", source->getName());
 
 				GLWFont::instance()->getLargePtFont()->
 					draw(source?source->getColor():defaultColor, fontSize_,
 						x - minusSource - outlineFontSize_ / 2.0f - 4.0f, y, 0.0f, 
-						source->getName());
+						"%s", source->getName());
 				GLWFont::instance()->getLargePtFont()->
 					draw(dest?dest->getColor():defaultColor, fontSize_,
 						x + outlineFontSize_ / 2.0f + 4.0f, y, 0.0f, 
-						dest->getName());
+						"%s", dest->getName());
 
 				if (entry.info.getIcon())
 				{
diff -ur scorched.orig/src/GLW/GLWScorchedInfo.cpp scorched/src/GLW/GLWScorchedInfo.cpp
--- scorched.orig/src/GLW/GLWScorchedInfo.cpp	2006-02-11 15:14:43.000000000 +0100
+++ scorched/src/GLW/GLWScorchedInfo.cpp	2006-02-11 15:23:34.000000000 +0100
@@ -92,12 +92,12 @@
 			}
 			float windwidth = (float) GLWFont::instance()->
 				getSmallPtFont()->getWidth(
-				fontSize_, buffer);
+				fontSize_, "%s", buffer);
 			float offSet = 0.0f;
 			if (!noCenter_) offSet = w_ / 2.0f - (windwidth / 2.0f);
 			GLWFont::instance()->getSmallPtFont()->draw(
 				*fontColor, fontSize_,
-				x_ + offSet, y_, 0.0f,
+				x_ + offSet, y_, 0.0f, "%s",
 				buffer);                    
 		}
 		break;
@@ -125,12 +125,12 @@
 		{
 			setToolTip(&model->getTips()->nameTip);
 			float namewidth = (float) GLWFont::instance()->getSmallPtFont()->getWidth(
-				fontSize_, current->getName());
+				fontSize_, "%s", current->getName());
 			float offSet = 0.0f;
 			if (!noCenter_) offSet = w_ / 2.0f - (namewidth / 2.0f);
 			GLWFont::instance()->getSmallPtFont()->draw(
 				current->getColor(), fontSize_,
-				x_ + offSet, y_, 0.0f,
+				x_ + offSet, y_, 0.0f, "%s",
 				current->getName());
 		}
 		break;
@@ -157,7 +157,7 @@
 			setToolTip(&model->getTips()->nameTip);
 			GLWFont::instance()->getSmallPtFont()->draw(
 				current->getColor(), fontSize_,
-				x_, y_, 0.0f,
+				x_, y_, 0.0f, "%s",
 				current->getScore().getStatsRank());
 		}
 		break;
@@ -165,7 +165,7 @@
 			setToolTip(&model->getTips()->autodTip);
 			GLWFont::instance()->getSmallPtFont()->draw(
 				*fontColor, fontSize_,
-				x_, y_, 0.0f,
+				x_, y_, 0.0f, "%s",
 				(current->getAccessories().getAutoDefense().haveDefense()?"On":"Off"));
 		break;
 		case eParachuteCount:
@@ -240,13 +240,13 @@
 			snprintf(buffer, sizeof(buffer), "%s",
 				current->getAccessories().getWeapons().getCurrent()->getName());
 			float weaponWidth = (float) GLWFont::instance()->getSmallPtFont()->
-				getWidth(fontSize_, buffer);
+				getWidth(fontSize_, "%s", buffer);
 
 			float offSet = 0.0f;
 			if (!noCenter_) offSet = w_ / 2.0f - (weaponWidth / 2.0f);
 			GLWFont::instance()->getSmallPtFont()->draw(
 				*fontColor, fontSize_,
-				x_ + offSet, y_, 0.0f,
+				x_ + offSet, y_, 0.0f, "%s",
 				buffer);
 		}
 		break;
Only in scorched/src/GLW: GLWScorchedInfo.cpp~
diff -ur scorched.orig/src/GLW/GLWSelectorPart.cpp scorched/src/GLW/GLWSelectorPart.cpp
--- scorched.orig/src/GLW/GLWSelectorPart.cpp	2004-12-27 17:53:10.000000000 +0100
+++ scorched/src/GLW/GLWSelectorPart.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -62,7 +62,7 @@
 
 		// Get width
 		float currentwidth = 
-			(float) font.getWidth(12, (char *) item.getText()) + 20.0f;
+			(float) font.getWidth(12, "%s", (char *) item.getText()) + 20.0f;
 		if (item.getSelected()) selected_ = true;
 		if (item.getIcon()) icon_ = true;
 		if (currentwidth > selectedWidth) selectedWidth = currentwidth;
@@ -196,7 +196,7 @@
 					currentTop - 16.0f, 0.0f, "x");
 			}
 			font.draw(*c, 12, selectedX_ + selectedIndent_ + 10.0f, 
-				currentTop - 16.0f, 0.0f, (char *) item.getText());
+				currentTop - 16.0f, 0.0f, "%s", (char *) item.getText());
 			currentTop -= 18.0f;
 		}
 	}
Only in scorched/src/GLW: GLWSelectorPart.cpp.orig
diff -ur scorched.orig/src/GLW/GLWToolTip.cpp scorched/src/GLW/GLWToolTip.cpp
--- scorched.orig/src/GLW/GLWToolTip.cpp	2006-02-11 15:14:43.000000000 +0100
+++ scorched/src/GLW/GLWToolTip.cpp	2006-02-11 15:20:24.000000000 +0100
@@ -39,7 +39,7 @@
 GLWTip::GLWTip(const char *tit, const char *tex) 
 	: id_(++nextId_), x(0), y(0), w(0), h(0), handler_(0)
 {
-	setText(tit, tex);
+	setText(tit, "%s", tex);
 }
 
 GLWTip::~GLWTip()
@@ -84,12 +84,12 @@
 	for (itor = texts.begin(); itor != enditor; itor++)
 	{
 		float width = float(GLWFont::instance()->getSmallPtFont()->
-			getWidth(9,(*itor))) + 10.0f;
+			getWidth(9, "%s", (*itor))) + 10.0f;
 		if (width > textWidth_) textWidth_ = width;
 	}
 
 	float width = float(GLWFont::instance()->getSmallPtFont()->
-		getWidth(11,title_.c_str())) + 10.0f; 
+		getWidth(11, "%s", title_.c_str())) + 10.0f; 
 	if (width > textWidth_) textWidth_ = width;
 }
 
@@ -262,7 +262,7 @@
 
 	float pos = posY + posH - 16.0f;
 	GLWFont::instance()->getSmallPtFont()->drawA(selectedColor, alpha, 11, posX + 3.0f, 
-		pos, 0.0f, lastTip_->getTitle());
+		pos, 0.0f, "%s", lastTip_->getTitle());
 	pos -= 2.0f;
 
 	std::list<char *> &texts = lastTip_->getTexts();
@@ -273,6 +273,6 @@
 		pos -= 10.0f;
 
 		GLWFont::instance()->getSmallPtFont()->drawA(color, alpha, 9, posX + 6.0f, 
-			pos, 0.0f, (*itor));
+			pos, 0.0f, "%s", (*itor));
 	}
 }
Only in scorched/src/GLW: GLWToolTip.cpp~
diff -ur scorched.orig/src/GLW/GLWWindow.cpp scorched/src/GLW/GLWWindow.cpp
--- scorched.orig/src/GLW/GLWWindow.cpp	2005-06-13 10:24:36.000000000 +0200
+++ scorched/src/GLW/GLWWindow.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -457,7 +457,7 @@
 
 	// Desc
 	if (!node->getNamedChild("description", description_)) return false;
-	toolTip_.setText(name_.c_str(), description_.c_str());
+	toolTip_.setText(name_.c_str(), "%s", description_.c_str());
 
 	// Disabled
 	XMLNode *disabled = 0;
diff -ur scorched.orig/src/actions/Lightning.cpp scorched/src/actions/Lightning.cpp
--- scorched.orig/src/actions/Lightning.cpp	2005-07-11 01:41:56.000000000 +0200
+++ scorched/src/actions/Lightning.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -92,7 +92,7 @@
 			{
 				SoundBuffer *expSound =
 					Sound::instance()->fetchOrCreateBuffer(
-					(char *) getDataFile(weapon_->getSound()));
+					(char *) getDataFile("%s", weapon_->getSound()));
 				SoundUtils::playAbsoluteSound(VirtualSoundPriority::eAction,
 					expSound, position_);
 			}
diff -ur scorched.orig/src/actions/SoundAction.cpp scorched/src/actions/SoundAction.cpp
--- scorched.orig/src/actions/SoundAction.cpp	2005-07-11 01:41:56.000000000 +0200
+++ scorched/src/actions/SoundAction.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -45,7 +45,7 @@
 	{
 		SoundBuffer *activateSound = 
 			Sound::instance()->fetchOrCreateBuffer((char *)
-				getDataFile(weapon_->getSound()));
+				getDataFile("%s", weapon_->getSound()));
 		SoundUtils::playRelativeSound(VirtualSoundPriority::eAction,
 			activateSound);
 	}
diff -ur scorched.orig/src/actions/TankSay.cpp scorched/src/actions/TankSay.cpp
--- scorched.orig/src/actions/TankSay.cpp	2005-07-11 22:40:38.000000000 +0200
+++ scorched/src/actions/TankSay.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -70,7 +70,7 @@
 		}
 		else if (OptionsParam::instance()->getDedicatedServer())
 		{
-			Logger::log(text_.c_str());
+			Logger::log("%s", text_.c_str());
 		}
 	}
 }
diff -ur scorched.orig/src/actions/Teleport.cpp scorched/src/actions/Teleport.cpp
--- scorched.orig/src/actions/Teleport.cpp	2005-07-11 01:41:56.000000000 +0200
+++ scorched/src/actions/Teleport.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -77,7 +77,7 @@
 			{
 				SoundBuffer *activateSound = 
 					Sound::instance()->fetchOrCreateBuffer((char *)
-						getDataFile(weapon_->getSound()));
+						getDataFile("%s", weapon_->getSound()));
 				SoundUtils::playAbsoluteSound(VirtualSoundPriority::eAction,
 					activateSound, tank->getPhysics().getTankPosition());
 			}
diff -ur scorched.orig/src/boids/BoidWorld.cpp scorched/src/boids/BoidWorld.cpp
--- scorched.orig/src/boids/BoidWorld.cpp	2005-08-09 17:39:32.000000000 +0200
+++ scorched/src/boids/BoidWorld.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -123,7 +123,7 @@
 		const char *sound = (*itor).c_str();
 		SoundBuffer *buffer =
 			Sound::instance()->fetchOrCreateBuffer(
-				(char *) getDataFile(sound));
+				(char *) getDataFile("%s", sound));
 		sounds_.push_back(buffer);
 	}
 }
diff -ur scorched.orig/src/client/ClientMain.cpp scorched/src/client/ClientMain.cpp
--- scorched.orig/src/client/ClientMain.cpp	2005-07-19 23:45:36.000000000 +0200
+++ scorched/src/client/ClientMain.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -175,7 +175,8 @@
 	std::string errorString;
 	if (!GLConsoleFileReader::loadFileIntoConsole(getDataFile("data/autoexec.xml"), errorString))
 	{
-		dialogMessage("Failed to parse data/autoexec.xml", errorString.c_str());
+		dialogMessage("Failed to parse data/autoexec.xml", "%s",
+			errorString.c_str());
 		return false;
 	}
 	return true;
diff -ur scorched.orig/src/client/ClientTextHandler.cpp scorched/src/client/ClientTextHandler.cpp
--- scorched.orig/src/client/ClientTextHandler.cpp	2005-07-11 22:40:39.000000000 +0200
+++ scorched/src/client/ClientTextHandler.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -65,7 +65,7 @@
 		MessageDisplay::instance()->clear();
 		MessageDisplay::instance()->addMessage(message.getText());
 
-		Logger::log(message.getText());
+		Logger::log("%s", message.getText());
 	}
 	else
 	{
diff -ur scorched.orig/src/client/MessageDisplay.cpp scorched/src/client/MessageDisplay.cpp
--- scorched.orig/src/client/MessageDisplay.cpp	2005-08-16 22:23:59.000000000 +0200
+++ scorched/src/client/MessageDisplay.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -62,7 +62,7 @@
 			if (currentText_.size())
 			{
 				GLConsole::instance()->addLine(
-					false, currentText_.c_str());
+					false, "%s", currentText_.c_str());
 			}
 			currentText_ = texts_.front();
 			texts_.pop_front();
@@ -86,7 +86,7 @@
 	float wHeight = (float) GLViewPort::getHeight();
 	float wWidth = (float) GLViewPort::getWidth();
 	float textWidth = float(GLWFont::instance()->getLargePtFont()->getWidth(
-		30, currentText_.c_str()));
+		30, "%s", currentText_.c_str()));
 
 	float x = (wWidth/2.0f) - (textWidth / 2) - 10.0f;
 	float y = wHeight - 60.0f;
@@ -100,6 +100,6 @@
 	Vector white(0.9f, 0.9f, 1.0f);
 	GLWFont::instance()->getLargePtFont()->draw(
 		white, 30, 
-		x + 10.0f, y + 7.0f, 0.0f,
+		x + 10.0f, y + 7.0f, 0.0f,"%s",
 		currentText_.c_str());
 }
diff -ur scorched.orig/src/client/SpeedChange.cpp scorched/src/client/SpeedChange.cpp
--- scorched.orig/src/client/SpeedChange.cpp	2006-02-11 15:14:43.000000000 +0100
+++ scorched/src/client/SpeedChange.cpp	2006-02-11 15:23:32.000000000 +0100
@@ -61,7 +61,7 @@
 		snprintf(buffer, sizeof(buffer), "%.1fX", speed);
 
 		static Vector fontColor(0.7f, 0.7f, 0.2f);
-		GLWFont::instance()->getLargePtFont()->draw(fontColor, 20, 10.0f, 10.0f, 0.0f, buffer);
+		GLWFont::instance()->getLargePtFont()->draw(fontColor, 20, 10.0f, 10.0f, 0.0f, "%s", buffer);
 	}
 }
 
Only in scorched/src/client: SpeedChange.cpp~
diff -ur scorched.orig/src/client/TargetCamera.cpp scorched/src/client/TargetCamera.cpp
--- scorched.orig/src/client/TargetCamera.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/client/TargetCamera.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -149,7 +149,7 @@
 		for (int i=0; i<noCameraDescriptions; i++)
 		{
 			cameraToolTips[i].setText(getCameraNames()[i],
-				cameraDescriptions[i]);
+				"%s", cameraDescriptions[i]);
 		}
 	}
 	return cameraToolTips;
diff -ur scorched.orig/src/dialogs/LogDialog.cpp scorched/src/dialogs/LogDialog.cpp
--- scorched.orig/src/dialogs/LogDialog.cpp	2005-04-05 00:35:25.000000000 +0200
+++ scorched/src/dialogs/LogDialog.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -58,7 +58,7 @@
 
 void LogDialog::logMessage(LoggerInfo &info)
 {
-	listView_->addLine(info.getMessage());
+	listView_->addLine("%s", info.getMessage());
 }
 
 void LogDialog::draw()
diff -ur scorched.orig/src/dialogs/ProgressDialog.cpp scorched/src/dialogs/ProgressDialog.cpp
--- scorched.orig/src/dialogs/ProgressDialog.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/dialogs/ProgressDialog.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -127,7 +127,7 @@
 
 			Vector color(0.2f, 0.2f, 0.2f);
 			GLWFont::instance()->getLargePtFont()->draw(color, 
-				14.0f, 20.0f, 33.0f, 0.0f, 
+				14.0f, 20.0f, 33.0f, 0.0f, "%s",
 				progressLabel_->getText());
 
 			HelpButtonDialog::instance()->getHelpTexture().draw();
@@ -148,10 +148,10 @@
 
 			Vector color2(0.4f, 0.4f, 0.4f);
 			GLWFont::instance()->getLargePtFont()->drawWidth(380, 
-				color2, 10.0f, 44.0f, 3.0f, 0.0f, 
+				color2, 10.0f, 44.0f, 3.0f, 0.0f, "%s",
 				tip1_.c_str());
 			GLWFont::instance()->getLargePtFont()->drawWidth(380, 
-				color2, 10.0f, 44.0f, -12.0f, 0.0f, 
+				color2, 10.0f, 44.0f, -12.0f, 0.0f, "%s",
 				tip2_.c_str());
 		glPopMatrix();
 	}
diff -ur scorched.orig/src/dialogs/RulesDialog.cpp scorched/src/dialogs/RulesDialog.cpp
--- scorched.orig/src/dialogs/RulesDialog.cpp	2005-06-27 02:55:48.000000000 +0200
+++ scorched/src/dialogs/RulesDialog.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -74,7 +74,7 @@
 		while (found)
 		{
 			*found = '\0';
-			listView_->addLine(start);
+			listView_->addLine("%s", start);
 			start = found;
 			start++;
 
@@ -82,12 +82,12 @@
 		}
 		if (start[0] != '\0')
 		{
-			listView_->addLine(start);
+			listView_->addLine("%s", start);
 		}
 	}
 	else
 	{
-		listView_->addLine(text);
+		listView_->addLine("%s", text);
 	}
 }
 
diff -ur scorched.orig/src/dialogs/SaveDialog.cpp scorched/src/dialogs/SaveDialog.cpp
--- scorched.orig/src/dialogs/SaveDialog.cpp	2005-08-17 14:53:13.000000000 +0200
+++ scorched/src/dialogs/SaveDialog.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -87,7 +87,7 @@
 		if (textBox_->getText()[0])
 		{
 			std::string saveFile = formatString("%s.s3d", textBox_->getText().c_str());
-			if (ClientSave::saveClient(getSaveFile(saveFile.c_str())))
+			if (ClientSave::saveClient(getSaveFile("%s", saveFile.c_str())))
 			{
 				Logger::log(LoggerInfo(LoggerInfo::TypePerformance,
 					formatString("Saved as \"%s\"", saveFile.c_str())));
diff -ur scorched.orig/src/dialogs/ScoreDialog.cpp scorched/src/dialogs/ScoreDialog.cpp
--- scorched.orig/src/dialogs/ScoreDialog.cpp	2005-06-02 01:09:32.000000000 +0200
+++ scorched/src/dialogs/ScoreDialog.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -137,7 +137,7 @@
 			405,
 			white,
 			20,
-			x_ + 8.0f, y_ + h_ - 21.0f, 0.0f,
+			x_ + 8.0f, y_ + h_ - 21.0f, 0.0f, "%s",
 			ScorchedClient::instance()->getOptionsGame().getServerName());
 	}
 	else
@@ -165,11 +165,11 @@
 				moves);
 
 		int roundsWidth = GLWFont::instance()->getSmallPtFont()->getWidth(
-			10, rounds);
+			10, "%s", rounds);
 		GLWFont::instance()->getSmallPtFont()->draw(
 			white,
 			10,
-			x_ + 430 - roundsWidth, y_ + h_ - 40.0f, 0.0f,
+			x_ + 430 - roundsWidth, y_ + h_ - 40.0f, 0.0f, "%s",
 			rounds);
 	}
 
@@ -373,7 +373,7 @@
 		GLWFont::instance()->getSmallPtFont()->draw(
 			current->getColor(),
 			10,
-			textX + nameLeft, textY, 0.0f,
+			textX + nameLeft, textY, 0.0f, "%s",
 			name);
 		GLWFont::instance()->getSmallPtFont()->draw(
 			current->getColor(),
diff -ur scorched.orig/src/engine/ModFiles.cpp scorched/src/engine/ModFiles.cpp
--- scorched.orig/src/engine/ModFiles.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/engine/ModFiles.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -82,7 +82,7 @@
 {
 	{
 		// Get and check the user mod directory exists
-		const char *modDir = getModFile(mod);
+		const char *modDir = getModFile("%s", mod);
 		if (DefinesUtil::dirExists(modDir))
 		{
 			if (!loadModDir(modDir, mod)) return false;
@@ -95,7 +95,7 @@
 
 	{
 		// Get and check global mod directory
-		const char *modDir = getGlobalModFile(mod);
+		const char *modDir = getGlobalModFile("%s", mod);
 		if (DefinesUtil::dirExists(modDir))
 		{
 			if (!loadModDir(modDir, mod)) return false;
@@ -135,8 +135,8 @@
 			dialogMessage("Mod",
 				"Failed to find \"%s\" mod files in directories \"%s\" \"%s\"",
 				mod,
-				getModFile(mod),
-				getGlobalModFile(mod));
+				getModFile("%s", mod),
+				getGlobalModFile("%s", mod));
 			return false;
 		}
 	}
@@ -217,7 +217,7 @@
 
 bool ModFiles::writeModFiles(const char *mod)
 {
-	const char *modDir = getModFile(mod);
+	const char *modDir = getModFile("%s", mod);
 	if (!DefinesUtil::dirExists(modDir))
 	{
 		DefinesUtil::dirMake(modDir);
diff -ur scorched.orig/src/landscape/HeightMapLoader.cpp scorched/src/landscape/HeightMapLoader.cpp
--- scorched.orig/src/landscape/HeightMapLoader.cpp	2004-11-13 13:39:53.000000000 +0100
+++ scorched/src/landscape/HeightMapLoader.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -110,7 +110,7 @@
 		// Load the landscape
 		levelSurround = file->levelsurround;
 		GLBitmap bitmap;
-		const char *fileName = getDataFile(file->file.c_str());
+		const char *fileName = getDataFile("%s", file->file.c_str());
 		if (!bitmap.loadFromFile(fileName, false))
 		{
 			dialogMessage("HeightMapLoader",
diff -ur scorched.orig/src/landscape/HeightMapModifier.cpp scorched/src/landscape/HeightMapModifier.cpp
--- scorched.orig/src/landscape/HeightMapModifier.cpp	2005-08-15 12:22:29.000000000 +0200
+++ scorched/src/landscape/HeightMapModifier.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -185,7 +185,7 @@
 	// Check if we need to load a new mask
 	if (!defn.mask.empty())
 	{
-		const char *fileName = getDataFile(defn.mask.c_str());
+		const char *fileName = getDataFile("%s", defn.mask.c_str());
 		if (!maskMap.loadFromFile(fileName, false))
 		{
 			dialogExit("Landscape",
diff -ur scorched.orig/src/landscape/Landscape.cpp scorched/src/landscape/Landscape.cpp
--- scorched.orig/src/landscape/Landscape.cpp	2005-07-11 01:41:56.000000000 +0200
+++ scorched/src/landscape/Landscape.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -202,15 +202,15 @@
 		LandscapeTexTextureGenerate *generate = 
 			(LandscapeTexTextureGenerate *) tex->texture;
 
-		GLBitmap texture0(getDataFile(generate->texture0.c_str()));
-		GLBitmap texture1(getDataFile(generate->texture1.c_str()));
-		GLBitmap texture2(getDataFile(generate->texture2.c_str()));
-		GLBitmap texture3(getDataFile(generate->texture3.c_str()));
-		GLBitmap texture4(getDataFile(generate->texture4.c_str()));
-		GLBitmap bitmapShore(getDataFile(generate->shore.c_str()));
-		GLBitmap bitmapRock(getDataFile(generate->rockside.c_str()));
-		GLBitmap bitmapRoof(getDataFile(generate->roof.c_str()));
-		GLBitmap bitmapSurround(getDataFile(generate->surround.c_str()));
+		GLBitmap texture0(getDataFile("%s", generate->texture0.c_str()));
+		GLBitmap texture1(getDataFile("%s", generate->texture1.c_str()));
+		GLBitmap texture2(getDataFile("%s", generate->texture2.c_str()));
+		GLBitmap texture3(getDataFile("%s", generate->texture3.c_str()));
+		GLBitmap texture4(getDataFile("%s", generate->texture4.c_str()));
+		GLBitmap bitmapShore(getDataFile("%s", generate->shore.c_str()));
+		GLBitmap bitmapRock(getDataFile("%s", generate->rockside.c_str()));
+		GLBitmap bitmapRoof(getDataFile("%s", generate->roof.c_str()));
+		GLBitmap bitmapSurround(getDataFile("%s", generate->surround.c_str()));
 		GLBitmap *bitmaps[5];
 		bitmaps[0] = &texture0;
 		bitmaps[1] = &texture1;
@@ -268,26 +268,26 @@
 	// Generate the scorch map for the landscape
 	std::string sprayMaskFile = getDataFile("data/textures/smoke01.bmp");
 	GLBitmap sprayMaskBitmap(sprayMaskFile.c_str(), sprayMaskFile.c_str(), false);
-	scorchMap_.loadFromFile(getDataFile(tex->scorch.c_str()));
-	GLBitmap scorchMap(getDataFile(tex->scorch.c_str()));
+	scorchMap_.loadFromFile(getDataFile("%s", tex->scorch.c_str()));
+	GLBitmap scorchMap(getDataFile("%s", tex->scorch.c_str()));
 	scorchMap.resize(sprayMaskBitmap.getWidth(), sprayMaskBitmap.getHeight());
 	GLBitmap texture1New(sprayMaskBitmap.getWidth(), sprayMaskBitmap.getHeight(), true);
 	GLBitmapModifier::makeBitmapTransparent(texture1New, scorchMap, sprayMaskBitmap);
 	landTex1_.replace(texture1New, GL_RGBA);
 
 	// Magma
-	GLBitmap bitmapMagma(getDataFile(tex->magmasmall.c_str()));
+	GLBitmap bitmapMagma(getDataFile("%s", tex->magmasmall.c_str()));
 	DIALOG_ASSERT(magTexture_.replace(bitmapMagma));
 
 	// Sky
-	std::string ctex(getDataFile(tex->skytexture.c_str()));
-	std::string ctexm(getDataFile(tex->skytexturemask.c_str()));
+	std::string ctex(getDataFile("%s", tex->skytexture.c_str()));
+	std::string ctexm(getDataFile("%s", tex->skytexturemask.c_str()));
 	GLBitmap bitmapCloud(ctex.c_str(), ctexm.c_str(), false);
 	DIALOG_ASSERT(cloudTexture_.replace(bitmapCloud, GL_RGBA));
-	skyColorsMap_.loadFromFile(getDataFile(tex->skycolormap.c_str()));
+	skyColorsMap_.loadFromFile(getDataFile("%s", tex->skycolormap.c_str()));
 
 	// Detail
-	GLBitmap bitmapDetail(getDataFile(tex->detail.c_str()));
+	GLBitmap bitmapDetail(getDataFile("%s", tex->detail.c_str()));
 	DIALOG_ASSERT(detailTexture_.replace(bitmapDetail, GL_RGB, true));
 
 	// Create the plan textures (for the plan and wind dialogs)
diff -ur scorched.orig/src/landscape/LandscapeDefn.cpp scorched/src/landscape/LandscapeDefn.cpp
--- scorched.orig/src/landscape/LandscapeDefn.cpp	2005-01-17 22:39:35.000000000 +0100
+++ scorched/src/landscape/LandscapeDefn.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -104,7 +104,7 @@
 		startmask)) return false;
 	if (!startmask.empty())
 	{
-		if (!checkDataFile(startmask.c_str())) return false;
+		if (!checkDataFile("%s", startmask.c_str())) return false;
 	}
 	return node->failChildren();
 }
@@ -113,7 +113,7 @@
 {
 	if (!node->getNamedChild("file", file)) return false;
 	if (!node->getNamedChild("levelsurround", levelsurround)) return false;
-	if (!checkDataFile(file.c_str())) return false;
+	if (!checkDataFile("%s", file.c_str())) return false;
 	return node->failChildren();
 }
 
@@ -137,7 +137,7 @@
 
 	if (!mask.empty())
 	{
-		if (!checkDataFile(mask.c_str())) return false;
+		if (!checkDataFile("%s", mask.c_str())) return false;
 	}
 	return node->failChildren();
 }
diff -ur scorched.orig/src/landscape/LandscapeObjectsPlacement.cpp scorched/src/landscape/LandscapeObjectsPlacement.cpp
--- scorched.orig/src/landscape/LandscapeObjectsPlacement.cpp	2005-07-18 00:27:13.000000000 +0200
+++ scorched/src/landscape/LandscapeObjectsPlacement.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -298,7 +298,7 @@
 			placement.objecttype.c_str());
 	}
 
-	GLBitmap map(getDataFile(placement.mask.c_str()));
+	GLBitmap map(getDataFile("%s", placement.mask.c_str()));
 	if (!map.getBits())
 	{
 		dialogExit("LandscapeObjectPlacementMask",
diff -ur scorched.orig/src/landscape/LandscapeSoundManager.cpp scorched/src/landscape/LandscapeSoundManager.cpp
--- scorched.orig/src/landscape/LandscapeSoundManager.cpp	2005-07-13 14:51:49.000000000 +0200
+++ scorched/src/landscape/LandscapeSoundManager.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -67,7 +67,7 @@
 			entry.soundType = (*typeItor);
 			entry.soundBuffer = 
 				Sound::instance()->fetchOrCreateBuffer((char *)
-					getDataFile(entry.soundType->sound.c_str()));
+					getDataFile("%s", entry.soundType->sound.c_str()));
 			entry.timeLeft = entry.soundType->timing->getNextEventTime();
 			entry.soundSource = new VirtualSoundSource(
 				VirtualSoundPriority::eEnvironment, (entry.timeLeft < 0.0f), false);
diff -ur scorched.orig/src/landscape/LandscapeTex.cpp scorched/src/landscape/LandscapeTex.cpp
--- scorched.orig/src/landscape/LandscapeTex.cpp	2005-08-02 19:27:44.000000000 +0200
+++ scorched/src/landscape/LandscapeTex.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -164,7 +164,7 @@
 	if (!soundsNode->getNamedChild("volume", soundvolume)) return false;
 	while (soundsNode->getNamedChild("sound", sound, false))
 	{
-		if (!checkDataFile(sound.c_str())) return false;
+		if (!checkDataFile("%s", sound.c_str())) return false;
 		sounds.push_back(sound);
 	}
 	if (!soundsNode->failChildren()) return false;
@@ -181,10 +181,10 @@
 	if (!node->getNamedChild("wavetexture1", wavetexture1)) return false;
 	if (!node->getNamedChild("wavetexture2", wavetexture2)) return false;
 	if (!node->getNamedChild("height", height)) return false;
-	if (!checkDataFile(reflection.c_str())) return false;
-	if (!checkDataFile(texture.c_str())) return false;
-	if (!checkDataFile(wavetexture1.c_str())) return false;
-	if (!checkDataFile(wavetexture2.c_str())) return false;
+	if (!checkDataFile("%s", reflection.c_str())) return false;
+	if (!checkDataFile("%s", texture.c_str())) return false;
+	if (!checkDataFile("%s", wavetexture1.c_str())) return false;
+	if (!checkDataFile("%s", wavetexture2.c_str())) return false;
 	return node->failChildren();
 }
 
@@ -200,15 +200,15 @@
 	if (!node->getNamedChild("texture2", texture2)) return false;
 	if (!node->getNamedChild("texture3", texture3)) return false;
 	if (!node->getNamedChild("texture4", texture4)) return false;
-	if (!checkDataFile(surround.c_str())) return false;
-	if (!checkDataFile(roof.c_str())) return false;
-	if (!checkDataFile(rockside.c_str())) return false;
-	if (!checkDataFile(shore.c_str())) return false;
-	if (!checkDataFile(texture0.c_str())) return false;
-	if (!checkDataFile(texture1.c_str())) return false;
-	if (!checkDataFile(texture2.c_str())) return false;
-	if (!checkDataFile(texture3.c_str())) return false;
-	if (!checkDataFile(texture4.c_str())) return false;
+	if (!checkDataFile("%s", surround.c_str())) return false;
+	if (!checkDataFile("%s", roof.c_str())) return false;
+	if (!checkDataFile("%s", rockside.c_str())) return false;
+	if (!checkDataFile("%s", shore.c_str())) return false;
+	if (!checkDataFile("%s", texture0.c_str())) return false;
+	if (!checkDataFile("%s", texture1.c_str())) return false;
+	if (!checkDataFile("%s", texture2.c_str())) return false;
+	if (!checkDataFile("%s", texture3.c_str())) return false;
+	if (!checkDataFile("%s", texture4.c_str())) return false;
 	return node->failChildren();
 }
 
@@ -253,12 +253,12 @@
 	if (!node->getNamedChild("skydiffuse", skydiffuse)) return false;
 	if (!node->getNamedChild("skyambience", skyambience)) return false;
 
-	if (!checkDataFile(detail.c_str())) return false;
-	if (!checkDataFile(magmasmall.c_str())) return false;
-	if (!checkDataFile(scorch.c_str())) return false;
-	if (!checkDataFile(skytexture.c_str())) return false;
-	if (!checkDataFile(skytexturemask.c_str())) return false;
-	if (!checkDataFile(skycolormap.c_str())) return false;
+	if (!checkDataFile("%s", detail.c_str())) return false;
+	if (!checkDataFile("%s", magmasmall.c_str())) return false;
+	if (!checkDataFile("%s", scorch.c_str())) return false;
+	if (!checkDataFile("%s", skytexture.c_str())) return false;
+	if (!checkDataFile("%s", skytexturemask.c_str())) return false;
+	if (!checkDataFile("%s", skycolormap.c_str())) return false;
 
 	{
 		XMLNode *placementsNode;
diff -ur scorched.orig/src/landscape/Water.cpp scorched/src/landscape/Water.cpp
--- scorched.orig/src/landscape/Water.cpp	2005-07-11 01:41:56.000000000 +0200
+++ scorched/src/landscape/Water.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -113,23 +113,23 @@
 		height_ = water->height;
 
 		waterOn_ = true;
-		const char *wave1 = getDataFile(
+		const char *wave1 = getDataFile("%s",
 			water->wavetexture1.c_str());
 		GLBitmap waves1Map(wave1, wave1, false);
-		const char *wave2 = getDataFile(
+		const char *wave2 = getDataFile("%s",
 			water->wavetexture2.c_str());
 		GLBitmap waves2Map(wave2, wave2, false);
 		wWaves_.getWavesTexture1().replace(waves1Map, GL_RGBA);
 		wWaves_.getWavesTexture2().replace(waves2Map, GL_RGBA);
-		bitmapWater_.loadFromFile(getDataFile(water->reflection.c_str()), false);
-		GLBitmap bitmapWaterDetail(getDataFile(water->texture.c_str()));
+		bitmapWater_.loadFromFile(getDataFile("%s", water->reflection.c_str()), false);
+		GLBitmap bitmapWaterDetail(getDataFile("%s", water->texture.c_str()));
 		wMap_.getWaterDetail().replace(bitmapWaterDetail, GL_RGB, true);
 		wWaves_.getWavesColor() = water->wavecolor;
 
 		// Generate the water texture for the spray sprite
 		std::string sprayMaskFile = getDataFile("data/textures/smoke01.bmp");
 		GLBitmap sprayMaskBitmap(sprayMaskFile.c_str(), sprayMaskFile.c_str(), false);
-		GLBitmap bitmapWater(getDataFile(water->reflection.c_str()));
+		GLBitmap bitmapWater(getDataFile("%s", water->reflection.c_str()));
 		bitmapWater.resize(
 			sprayMaskBitmap.getWidth(), sprayMaskBitmap.getHeight());
 		GLBitmap textureWaterNew(
Only in scorched/src/ode: error.cpp.orig
diff -ur scorched.orig/src/scorched/MainDialog.cpp scorched/src/scorched/MainDialog.cpp
--- scorched.orig/src/scorched/MainDialog.cpp	2006-02-11 15:14:43.000000000 +0100
+++ scorched/src/scorched/MainDialog.cpp	2006-02-11 15:18:07.000000000 +0100
@@ -171,7 +171,7 @@
 {
 	wxButton *button = 0;
 	wxBitmap bitmap;
-	const char *bitmapFile = getDataFile(bitmapName);
+	const char *bitmapFile = getDataFile("%s", bitmapName);
 	if (bitmap.LoadFile(wxString(bitmapFile, wxConvUTF8), wxBITMAP_TYPE_BMP) &&
 		bitmap.Ok())
 	{
Only in scorched/src/scorched: MainDialog.cpp~
diff -ur scorched.orig/src/scorched/NetDialog.cpp scorched/src/scorched/NetDialog.cpp
--- scorched.orig/src/scorched/NetDialog.cpp	2006-02-11 15:14:43.000000000 +0100
+++ scorched/src/scorched/NetDialog.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -510,7 +510,7 @@
 			strcat(buffer, " -username ");
 			strcat(buffer, username.mb_str(wxConvUTF8));
 		}
-		runScorched3D(buffer);
+		runScorched3D("%s", buffer);
 	}
 	return false;
 }
diff -ur scorched.orig/src/scorched/ServerDialog.cpp scorched/src/scorched/ServerDialog.cpp
--- scorched.orig/src/scorched/ServerDialog.cpp	2006-02-11 15:14:43.000000000 +0100
+++ scorched/src/scorched/ServerDialog.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -573,7 +573,7 @@
 	{
 		Logger::log( "Says \"%s\"", 
 			entryDialog.GetValue().GetData());
-		ServerCommon::sendString(0, entryDialog.GetValue().mb_str(wxConvUTF8));
+		ServerCommon::sendString(0, "%s", entryDialog.GetValue().mb_str(wxConvUTF8));
 	}
 }
 
@@ -600,7 +600,7 @@
 				if (!tank->getTankAI())
 				{
 					ServerCommon::sendString(tank->getDestinationId(), 
-						entryDialog.GetValue().mb_str(wxConvUTF8));
+						"%s", entryDialog.GetValue().mb_str(wxConvUTF8));
 				}
 			}
 		}
diff -ur scorched.orig/src/scorched/SingleChoiceDialog.cpp scorched/src/scorched/SingleChoiceDialog.cpp
--- scorched.orig/src/scorched/SingleChoiceDialog.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/scorched/SingleChoiceDialog.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -106,7 +106,7 @@
 		char *desc = (char *) entry.description.c_str();
 
 		wxObjectRefData *refData = new SingleChoiceFrameData(
-			getDataFile(entry.gamefile.c_str()));
+			getDataFile("%s", entry.gamefile.c_str()));
 		addButtonToWindow(useId++, 
 			desc, icon, 
 			this, gridsizer, refData);
Only in scorched/src/scorched: SingleChoiceDialog.cpp.orig
diff -ur scorched.orig/src/scorched/SingleGames.cpp scorched/src/scorched/SingleGames.cpp
--- scorched.orig/src/scorched/SingleGames.cpp	2004-11-25 21:19:34.000000000 +0100
+++ scorched/src/scorched/SingleGames.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -56,7 +56,7 @@
 	if (!mainNode->getNamedChild("description", description)) return false;
 	if (!mainNode->getNamedChild("icon", icon)) return false;
 	if (!mainNode->getNamedChild("url", url)) return false;
-	if (!checkDataFile(icon.c_str())) return false;
+	if (!checkDataFile("%s", icon.c_str())) return false;
 
 	XMLNode *gameNode = 0;
 	while (file.getRootNode()->getNamedChild("game", gameNode, false))
@@ -65,8 +65,8 @@
 		if (!gameNode->getNamedChild("description", entry.description)) return false;
 		if (!gameNode->getNamedChild("icon", entry.icon)) return false;
 		if (!gameNode->getNamedChild("gamefile", entry.gamefile)) return false;
-		if (!checkDataFile(entry.icon.c_str())) return false;
-		if (!checkDataFile(entry.gamefile.c_str())) return false;
+		if (!checkDataFile("%s", entry.icon.c_str())) return false;
+		if (!checkDataFile("%s", entry.gamefile.c_str())) return false;
 		if (!gameNode->failChildren()) return false;
 		entries.push_back(entry);
 	}
diff -ur scorched.orig/src/scorched/main.cpp scorched/src/scorched/main.cpp
--- scorched.orig/src/scorched/main.cpp	2006-02-11 15:14:43.000000000 +0100
+++ scorched/src/scorched/main.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -100,7 +100,7 @@
 			itor++)
 		{
 			const char *modDir = (*itor).c_str();
-			std::string src = getModFile(modDir);
+			std::string src = getModFile("%s", modDir);
 			std::string dest = getSettingsFile("/oldmods/%s-%u", modDir, time(0));
 			if (DefinesUtil::dirExists(src.c_str()))
 			{
Only in scorched/src/scorched: main.cpp~
diff -ur scorched.orig/src/server/ServerAdminHandler.cpp scorched/src/server/ServerAdminHandler.cpp
--- scorched.orig/src/server/ServerAdminHandler.cpp	2005-06-20 02:35:08.000000000 +0200
+++ scorched/src/server/ServerAdminHandler.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -142,7 +142,7 @@
 			result +=
 				"-----------------------------------------------------\n";
 
-			ServerCommon::sendString(destinationId, result.c_str());
+			ServerCommon::sendString(destinationId, "%s", result.c_str());
 		}
 		break;
 	case ComsAdminMessage::AdminLogout:
@@ -193,7 +193,7 @@
 			result +=
 				"-----------------------------------------------------\n";
 
-			ServerCommon::sendString(destinationId, result.c_str());
+			ServerCommon::sendString(destinationId, "%s", result.c_str());
 		}
 		break;
 	case ComsAdminMessage::AdminShowAliases:
@@ -221,7 +221,7 @@
 				result +=
 					"-----------------------------------------------------\n";
 
-				ServerCommon::sendString(destinationId, result.c_str());
+				ServerCommon::sendString(destinationId, "%s", result.c_str());
 			}
 			else ServerCommon::sendString(destinationId, "Unknown player for showaliases");
 		}
@@ -251,7 +251,7 @@
 				result +=
 					"-----------------------------------------------------\n";
 
-				ServerCommon::sendString(destinationId, result.c_str());
+				ServerCommon::sendString(destinationId, "%s", result.c_str());
 			}
 			else ServerCommon::sendString(destinationId, "Unknown player for showipaliases");
 		}
@@ -391,21 +391,21 @@
 			adminTank->getName(),
 			message.getParam1());
 
-		ServerCommon::sendString(0, message.getParam1());
+		ServerCommon::sendString(0, "%s", message.getParam1());
 		break;
 	case ComsAdminMessage::AdminAdminTalk:
 		ServerCommon::serverLog(0,
 			"\"%s\" admin admintalk \"%s\"",
 			adminTank->getName(),
 			message.getParam1());
-		ServerCommon::sendStringAdmin(message.getParam1());
+		ServerCommon::sendStringAdmin("%s", message.getParam1());
 		break;
 	case ComsAdminMessage::AdminMessage:
 		ServerCommon::serverLog(0,
 			"\"%s\" admin message \"%s\"",
 			adminTank->getName(),
 			message.getParam1());
-		ServerCommon::sendStringMessage(0, message.getParam1());
+		ServerCommon::sendStringMessage(0, "%s", message.getParam1());
 		break;
 	case ComsAdminMessage::AdminKillAll:
 		ServerCommon::serverLog(0,
diff -ur scorched.orig/src/server/ServerCommon.cpp scorched/src/server/ServerCommon.cpp
--- scorched.orig/src/server/ServerCommon.cpp	2006-02-11 15:14:43.000000000 +0100
+++ scorched/src/server/ServerCommon.cpp	2006-02-11 15:23:57.000000000 +0100
@@ -298,6 +298,6 @@
 		vsnprintf(text, sizeof(text), fmt, ap);
 		va_end(ap);
 
-		Logger::log(text);
+		Logger::log("%s", text);
 	}
 }
Only in scorched/src/server: ServerCommon.cpp~
diff -ur scorched.orig/src/server/ServerNewGameState.cpp scorched/src/server/ServerNewGameState.cpp
--- scorched.orig/src/server/ServerNewGameState.cpp	2005-08-10 14:39:31.000000000 +0200
+++ scorched/src/server/ServerNewGameState.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -296,7 +296,7 @@
 		tankCloseness = height->startcloseness;
 		if (!height->startmask.empty())
 		{
-			tankMask.loadFromFile(getDataFile(height->startmask.c_str()));
+			tankMask.loadFromFile(getDataFile("%s", height->startmask.c_str()));
 			DIALOG_ASSERT(tankMask.getBits());
 		}
 	}
diff -ur scorched.orig/src/server/ServerTimedMessage.cpp scorched/src/server/ServerTimedMessage.cpp
--- scorched.orig/src/server/ServerTimedMessage.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/server/ServerTimedMessage.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -61,6 +61,12 @@
 			entry.lastTime = currentTime;
 			
 			std::string message = entry.messages.front();
+ 			/* Note message.c_str() is a user supplied printf format string
+			   with possible a conversion specifier to display the ctime.
+			   Since these messages are loaded from a local file this is
+			   reasonable safe, although it would be better to just
+			   always prefix times-messages with the ctime and to not
+			   interpreted user supplied data this way. */
 			ServerCommon::sendString(0, message.c_str(), ctime(&currentTime));
 			Logger::log(message.c_str(), ctime(&currentTime));
 			entry.messages.pop_front();
diff -ur scorched.orig/src/server/ServerWebHandler.cpp scorched/src/server/ServerWebHandler.cpp
--- scorched.orig/src/server/ServerWebHandler.cpp	2005-08-14 21:11:42.000000000 +0200
+++ scorched/src/server/ServerWebHandler.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -312,17 +312,17 @@
 		const char *type = getField(fields, "type");
 		if (!type || 0 == strcmp(type, "all"))
 		{
-			ServerCommon::sendString(0, say);
+			ServerCommon::sendString(0, "%s", say);
 			ServerCommon::serverLog(0, "Says : %s", say);
 		}
 		else if (0 == strcmp(type, "message"))
 		{
-			ServerCommon::sendStringMessage(0, say);
+			ServerCommon::sendStringMessage(0, "%s", say);
 			ServerCommon::serverLog(0, "Messages : %s", say);
 		}
 		else if (0 == strcmp(type, "admin"))
 		{
-			ServerCommon::sendStringAdmin(say);
+			ServerCommon::sendStringAdmin("%s", say);
 			ServerCommon::serverLog(0, "Admins Says : %s", say);
 		}
 	}
diff -ur scorched.orig/src/sound/Sound.cpp scorched/src/sound/Sound.cpp
--- scorched.orig/src/sound/Sound.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/sound/Sound.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -118,19 +118,19 @@
 	alDistanceModel(AL_INVERSE_DISTANCE);
 
 	GLConsole::instance()->addLine(false, "AL_VENDOR:");
-	GLConsole::instance()->addLine(false, 
+	GLConsole::instance()->addLine(false, "%s",
 		checkString((char *) alGetString(AL_VENDOR)));
 	GLConsole::instance()->addLine(false, "AL_VERSION:");
-	GLConsole::instance()->addLine(false,
+	GLConsole::instance()->addLine(false, "%s",
 		checkString((char *) alGetString(AL_VERSION)));
 	GLConsole::instance()->addLine(false, "AL_RENDERER:");
-	GLConsole::instance()->addLine(false, 
+	GLConsole::instance()->addLine(false, "%s", 
 		checkString((char *) alGetString(AL_RENDERER)));
 	GLConsole::instance()->addLine(false, "AL_EXTENSIONS:");
-	GLConsole::instance()->addLine(false,
+	GLConsole::instance()->addLine(false, "%s",
 		checkString((char *) alGetString(AL_EXTENSIONS)));
 	GLConsole::instance()->addLine(false, "ALC_DEVICE_SPECIFIER:");
-	GLConsole::instance()->addLine(false,
+	GLConsole::instance()->addLine(false, "%s",
 		checkString((char *) alcGetString(soundDevice, ALC_DEVICE_SPECIFIER)));
 
 	// Create all sound channels
diff -ur scorched.orig/src/sprites/ExplosionLaserBeamRenderer.cpp scorched/src/sprites/ExplosionLaserBeamRenderer.cpp
--- scorched.orig/src/sprites/ExplosionLaserBeamRenderer.cpp	2005-07-11 01:41:56.000000000 +0200
+++ scorched/src/sprites/ExplosionLaserBeamRenderer.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -49,7 +49,7 @@
 	{
 		SoundBuffer *firedSound = 
 			Sound::instance()->fetchOrCreateBuffer( (char*)
-				getDataFile(data));
+				getDataFile("%s", data));
 		SoundUtils::playAbsoluteSound(VirtualSoundPriority::eAction,
 			firedSound, position);
 	}
diff -ur scorched.orig/src/sprites/ExplosionTextures.cpp scorched/src/sprites/ExplosionTextures.cpp
--- scorched.orig/src/sprites/ExplosionTextures.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/sprites/ExplosionTextures.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -193,7 +193,7 @@
 			return *(*findItor).second;
 		}
 
-		const char *fileName = getDataFile(name);
+		const char *fileName = getDataFile("%s", name);
 		if (DefinesUtil::fileExists(fileName))
 		{
 			GLBitmap *map = new GLBitmap;
diff -ur scorched.orig/src/sprites/MissileActionRenderer.cpp scorched/src/sprites/MissileActionRenderer.cpp
--- scorched.orig/src/sprites/MissileActionRenderer.cpp	2005-07-11 01:41:56.000000000 +0200
+++ scorched/src/sprites/MissileActionRenderer.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -92,7 +92,7 @@
 		if (0 != strcmp("none", engineSound))
 		{
 			SoundBuffer *rocket = Sound::instance()->fetchOrCreateBuffer(
-				(char *) getDataFile(engineSound));
+				(char *) getDataFile("%s", engineSound));
 			sound_ = new VirtualSoundSource(VirtualSoundPriority::eMissile, true, false);
 			sound_->setPosition(shot->getCurrentPosition());
 			sound_->setGain(0.25f);
diff -ur scorched.orig/src/sprites/TextActionRenderer.cpp scorched/src/sprites/TextActionRenderer.cpp
--- scorched.orig/src/sprites/TextActionRenderer.cpp	2004-02-25 01:49:49.000000000 +0100
+++ scorched/src/sprites/TextActionRenderer.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -55,7 +55,7 @@
 	GLState currentState(GLState::DEPTH_ON | GLState::TEXTURE_ON);
 	glDepthMask(GL_FALSE);
 	GLWFont::instance()->getSmallPtFont()->drawBilboard(color_, 1.0f, 
-		position_[0], position_[1], position_[2],
+		position_[0], position_[1], position_[2], "%s",
 		text_.c_str());
 
 	glDepthMask(GL_TRUE);
diff -ur scorched.orig/src/tankgraph/GLWTankViewer.cpp scorched/src/tankgraph/GLWTankViewer.cpp
--- scorched.orig/src/tankgraph/GLWTankViewer.cpp	2005-06-04 03:56:53.000000000 +0200
+++ scorched/src/tankgraph/GLWTankViewer.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -215,6 +215,7 @@
 				{
 					toolTip_.setText(
 						"Model",
+						"%s",
 						models_[vectorPos]->getId().getModelName());			
 				}
 
@@ -293,7 +294,7 @@
 	Vector color(0.3f, 0.3f, 0.3f);
 	GLWFont::instance()->getSmallPtFont()->
 		drawWidth(int(TankSquareSize * 2 + TankPadding), 
-			color, 10.0f, -70.0f, 75.0f, 0.0f, 
+			color, 10.0f, -70.0f, 75.0f, 0.0f, "%s",
 			models_[pos]->getId().getModelName());
 	GLWFont::instance()->getSmallPtFont()->
 		drawWidth(int(TankSquareSize * 2 + TankPadding), 
diff -ur scorched.orig/src/tankgraph/TankMenus.cpp scorched/src/tankgraph/TankMenus.cpp
--- scorched.orig/src/tankgraph/TankMenus.cpp	2006-02-11 15:14:43.000000000 +0100
+++ scorched/src/tankgraph/TankMenus.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -197,7 +197,7 @@
 			currentTank == tank?'>':' ',
 			description,
 			tank->getName(), modelId.getModelName());
-		GLConsole::instance()->addLine(false, buffer);
+		GLConsole::instance()->addLine(false, "%s", buffer);
 	}
 
 	GLConsole::instance()->addLine(false,
diff -ur scorched.orig/src/tankgraph/TankModelRenderer.cpp scorched/src/tankgraph/TankModelRenderer.cpp
--- scorched.orig/src/tankgraph/TankModelRenderer.cpp	2005-07-19 23:45:37.000000000 +0200
+++ scorched/src/tankgraph/TankModelRenderer.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -170,14 +170,14 @@
 	{
 		Vector &bilX = GLCameraFrustum::instance()->getBilboardVectorX(); 
 		bilX *= 0.5f * (float) GLWFont::instance()->getSmallPtFont()->getWidth(
-			1, tank_->getName());
+			1, "%s", tank_->getName());
 
 		glDepthMask(GL_FALSE);
 		GLWFont::instance()->getSmallPtFont()->drawBilboard(
 			tank_->getColor(), 1,
 			(float) tank_->getPhysics().getTankPosition()[0] - bilX[0], 
 			(float) tank_->getPhysics().getTankPosition()[1] - bilX[1], 
-			(float) height + 8.0f,
+			(float) height + 8.0f, "%s",
 			tank_->getName());
 		glDepthMask(GL_TRUE);
 	}
@@ -188,7 +188,7 @@
 		if (OptionsDisplay::instance()->getDrawPlayerNames())
 		{
 			bilX *= 0.5f * (float) GLWFont::instance()->getSmallPtFont()->getWidth(
-				1, tank_->getName());
+				1, "%s", tank_->getName());
 			bilX += bilX.Normalize() * 1.0f;
 		}
 		else
@@ -633,11 +633,11 @@
 			GLWFont::instance()->getSmallPtFont()->draw(
 				yellow, 10,
 				(float) posX_ + 47.0f, (float) posY_ - 4.0f, (float) posZ_,
-				TankModelRendererHUD::getTextA());
+				"%s", TankModelRendererHUD::getTextA());
 			GLWFont::instance()->getSmallPtFont()->draw(
 				yellow, 10,
 				(float) posX_ + 47.0f, (float) posY_ - 15.0f, (float) posZ_,
-				TankModelRendererHUD::getTextB());
+				"%s", TankModelRendererHUD::getTextB());
 
 			if (TankModelRendererHUD::getPercentage() >= 0.0f)
 			{
diff -ur scorched.orig/src/weapons/Accessory.cpp scorched/src/weapons/Accessory.cpp
--- scorched.orig/src/weapons/Accessory.cpp	2005-06-11 18:53:41.000000000 +0200
+++ scorched/src/weapons/Accessory.cpp	2006-02-11 15:14:55.000000000 +0100
@@ -65,7 +65,7 @@
 
 	// Get the accessory description
 	accessoryNode->getNamedChild("description", description_, false);
-	toolTip_.setText(getName(), getDescription());
+	toolTip_.setText(getName(), "%s", getDescription());
 
 	// Get the accessory icon
 	if (accessoryNode->getNamedChild("icon", iconName_, false))

scorched3d-negint.patch:

--- NEW FILE scorched3d-negint.patch ---
--- scorched.orig/src/server/ServerConnectHandler.cpp.negint	2006-02-11 16:54:09.000000000 +0100
+++ scorched.orig/src/server/ServerConnectHandler.cpp	2006-02-11 16:58:06.000000000 +0100
@@ -121,9 +121,9 @@
 	}
 
 	// Check player availability
-	if ((int) message.getNoPlayers() > 
+	if (message.getNoPlayers() > (unsigned int)(
 		ScorchedServer::instance()->getOptionsGame().getNoMaxPlayers() -
-		ScorchedServer::instance()->getTankContainer().getNoOfTanks())
+		ScorchedServer::instance()->getTankContainer().getNoOfTanks()))
 	{
 		ServerCommon::sendString(destinationId, 
 			"--------------------------------------------------\n"

scorched3d-pgsql.patch:

--- NEW FILE scorched3d-pgsql.patch ---
diff -ur scorched.orig/src/common/StatsLoggerPGSQL.cpp scorched/src/common/StatsLoggerPGSQL.cpp
--- scorched.orig/src/common/StatsLoggerPGSQL.cpp	2005-03-22 18:45:49.000000000 +0100
+++ scorched/src/common/StatsLoggerPGSQL.cpp	2006-02-10 11:50:42.000000000 +0100
@@ -72,8 +72,8 @@
     int sqlLen = vsnprintf(text, SQL_BUFFER_SIZE, fmt, ap);
     va_end(ap);
 
-    if(sqlLen >= SQL_BUFFER_SIZE) {
-        Logger::log(0, "pgsql: Query failed, too long.\n");
+    if(sqlLen >= SQL_BUFFER_SIZE || sqlLen < 0) {
+        Logger::log("pgsql: Query failed, too long.\n");
         return false;
     }
 
@@ -113,15 +113,15 @@
                         passwd.c_str());
                 if (pgsql_ && PQstatus(pgsql_) == CONNECTION_OK)
                 {
-                    Logger::log(0, "pgsql stats logger started");
+                    Logger::log("pgsql stats logger started");
                 }
                 else
                 {
                     success_ = false;
-                    Logger::log(0, "pgsql stats logger failed to start. "
+                    Logger::log("pgsql stats logger failed to start. "
                             "Error: %s",
                             PQerrorMessage(pgsql_));
-                    Logger::log(0, "pgsql params : host %s, user %s, passwd %s, db %s",
+                    Logger::log("pgsql params : host %s, user %s, passwd %s, db %s",
                             host.c_str(), user.c_str(),
                             passwd.c_str(), db.c_str());
                     if(pgsql_) {
@@ -133,13 +133,13 @@
             else
             {
                 success_ = false;
-                Logger::log(0, "Failed to parse %s settings file.", fileName);
+                Logger::log("Failed to parse %s settings file.", fileName);
             }
         }
         else
         {	
             success_ = false;
-            Logger::log(0, "Failed to parse %s settings file. Error: %s", 
+            Logger::log("Failed to parse %s settings file. Error: %s", 
                     fileName,
                     file.getParserError());
         }
@@ -618,11 +618,11 @@
         if(lastresult_ && PQntuples(lastresult_) > 0) {
             playerId = atoi(PQgetvalue(lastresult_,0,0));
         }
-        Logger::log(0, "Add new stats user \"%i\"", playerId);
+        Logger::log("Add new stats user \"%i\"", playerId);
     }
     else
     {
-        Logger::log(0, "Found stats user \"%i\"", playerId);
+        Logger::log("Found stats user \"%i\"", playerId);
     }
 
     // Store this new player id

scorched3d-sprintf.patch:

--- NEW FILE scorched3d-sprintf.patch ---
diff -ur scorched.orig/src/3dsparse/MSModelFactory.cpp scorched/src/3dsparse/MSModelFactory.cpp
--- scorched.orig/src/3dsparse/MSModelFactory.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/3dsparse/MSModelFactory.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -278,7 +278,8 @@
 		if (sscanf(buffer, "%s", textureName) != 1)
 			returnError(fileName, "No material texture format");
 		textureName[strlen(textureName)-1] = '\0';
-		sprintf(fullTextureName, "%s/%s", filePath, &textureName[1]);
+		snprintf(fullTextureName, sizeof(fullTextureName), "%s/%s",
+			filePath, &textureName[1]);
 		while (sep=strchr(fullTextureName, '\\')) *sep = '/';
 
 		// alphamap
@@ -289,7 +290,8 @@
 		if (sscanf(buffer, "%s", textureNameAlpha) != 1)
 			returnError(fileName, "No material alpha texture format");
 		textureNameAlpha[strlen(textureNameAlpha)-1] = '\0';
-		sprintf(fullTextureAlphaName, "%s/%s", filePath, &textureNameAlpha[1]);
+		snprintf(fullTextureAlphaName, sizeof(fullTextureAlphaName),
+			"%s/%s", filePath, &textureNameAlpha[1]);
 		while (sep=strchr(fullTextureAlphaName, '\\')) *sep = '/';
 
 		int modelIndex = 0;
diff -ur scorched.orig/src/3dsparse/ModelID.cpp scorched/src/3dsparse/ModelID.cpp
--- scorched.orig/src/3dsparse/ModelID.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/3dsparse/ModelID.cpp	2006-02-11 15:10:00.000000000 +0100
@@ -75,7 +75,8 @@
 		if (!modelNode->getNamedChild("mesh", meshNode)) return false;
 		const char *meshNameContent = meshNode->getContent();
 		static char meshName[1024];
-		sprintf(meshName, "%s/%s", directory, meshNameContent);
+		snprintf(meshName, sizeof(meshName), "%s/%s", directory,
+			meshNameContent);
 		if (!DefinesUtil::fileExists(getDataFile(meshName)))
 		{
 			dialogMessage("Scorched Models",
@@ -89,7 +90,8 @@
 		static char skinName[1024];
 		if (strcmp(skinNameContent, "none") != 0)
 		{
-			sprintf(skinName, "%s/%s", directory, skinNameContent);
+			snprintf(skinName, sizeof(skinName), "%s/%s",
+				directory, skinNameContent);
 			if (!DefinesUtil::fileExists(getDataFile(skinName)))
 			{
 				dialogMessage("Scorched Models",
@@ -100,7 +102,8 @@
 		}
 		else
 		{
-			sprintf(skinName, "%s", skinNameContent);
+			snprintf(skinName, sizeof(skinName), "%s",
+				skinNameContent);
 		}
 
 		meshName_ = meshName;
@@ -110,7 +113,8 @@
 	{
 		const char *meshNameContent = modelNode->getContent();
 		static char meshName[1024];
-		sprintf(meshName, "%s/%s", directory, meshNameContent);
+		snprintf(meshName, sizeof(meshName), "%s/%s", directory,
+			meshNameContent);
 
 		if (!DefinesUtil::fileExists(getDataFile(meshName)))
 		{
Only in scorched/src/3dsparse: ModelID.cpp~
diff -ur scorched.orig/src/3dsparse/aseFile.tab.cpp scorched/src/3dsparse/aseFile.tab.cpp
--- scorched.orig/src/3dsparse/aseFile.tab.cpp	2005-04-12 00:19:08.000000000 +0200
+++ scorched/src/3dsparse/aseFile.tab.cpp	2006-02-11 15:10:46.000000000 +0100
@@ -1056,7 +1056,7 @@
 int aseerror(const char *errmsg)
 {
 	char buffer[1024];
-	sprintf(buffer, "%i:%s\n", aselineno, errmsg);
+	snprintf(buffer, sizeof(buffer), "%i:%s\n", aselineno, errmsg);
 	dialogMessage("Lexer", buffer);
     return 0;
 }
@@ -1064,7 +1064,7 @@
 int asewarning(const char *warningmsg)
 {
 	char buffer[1024];
-	sprintf(buffer, "%i:%s\n", aselineno, warningmsg);
+	snprintf(buffer, sizeof(buffer), "%i:%s\n", aselineno, warningmsg);
 	dialogMessage("Lexer", buffer);
     return 0;
 }
@@ -1072,7 +1072,7 @@
 int asedebug(const char *debugmsg)
 {
 	char buffer[1024];
-	sprintf(buffer, "%i:%s\n", aselineno, debugmsg);
+	snprintf(buffer, sizeof(buffer), "%i:%s\n", aselineno, debugmsg);
 	dialogMessage("Lexer", buffer);
     return 0;
 }
Only in scorched/src/3dsparse: aseFile.tab.cpp~
diff -ur scorched.orig/src/GLEXT/GLConsole.cpp scorched/src/GLEXT/GLConsole.cpp
--- scorched.orig/src/GLEXT/GLConsole.cpp	2005-04-05 00:35:23.000000000 +0200
+++ scorched/src/GLEXT/GLConsole.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -265,7 +265,7 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, TEXT_SIZE, fmt, ap);
 	va_end(ap);
 
 	DIALOG_ASSERT(strlen(text)<TEXT_SIZE);
diff -ur scorched.orig/src/GLEXT/GLConsoleRuleFn.cpp scorched/src/GLEXT/GLConsoleRuleFn.cpp
--- scorched.orig/src/GLEXT/GLConsoleRuleFn.cpp	2003-07-10 18:29:16.000000000 +0200
+++ scorched/src/GLEXT/GLConsoleRuleFn.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -136,7 +136,7 @@
 		break;
 	case GLConsoleRuleTypeNumber:
 		static char buffer[10];
-		sprintf(buffer,"%.2f", user_->getNumberParam(name_.c_str()));
+		snprintf(buffer, sizeof(buffer), "%.2f", user_->getNumberParam(name_.c_str()));
 		value = buffer;
 		break;
 	case GLConsoleRuleTypeString:
diff -ur scorched.orig/src/GLEXT/GLFont2d.cpp scorched/src/GLEXT/GLFont2d.cpp
--- scorched.orig/src/GLEXT/GLFont2d.cpp	2005-07-11 22:40:36.000000000 +0200
+++ scorched/src/GLEXT/GLFont2d.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -56,7 +56,7 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, sizeof(text), fmt, ap);
 	va_end(ap);	
 
 	float width = 0.0f;
@@ -75,7 +75,7 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, sizeof(text), fmt, ap);
 	va_end(ap);	
 
 	drawString((GLsizei) strlen(text), color, 1.0f, size, x, y, z, text, false);
@@ -89,7 +89,7 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, sizeof(text), fmt, ap);
 	va_end(ap);	
 
 	drawString((GLsizei) strlen(text), color, alpha, size, x, y, z, text, false);
@@ -103,7 +103,7 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, sizeof(text), fmt, ap);
 	va_end(ap);	
 
 	drawString((GLsizei) strlen(text), color, 1.0f, size, x, y, z, text, false, size2);
@@ -118,7 +118,7 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, sizeof(text), fmt, ap);
 	va_end(ap);	
 
 	int s = start;
@@ -143,7 +143,7 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, sizeof(text), fmt, ap);
 	va_end(ap);	
 
 	int l = 0;
@@ -165,7 +165,7 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, sizeof(text), fmt, ap);
 	va_end(ap);	
 
 	drawString((GLsizei) strlen(text), color, 1.0f, size, x, y, z, text, true);
diff -ur scorched.orig/src/GLW/GLWListView.cpp scorched/src/GLW/GLWListView.cpp
--- scorched.orig/src/GLW/GLWListView.cpp	2005-06-20 02:35:07.000000000 +0200
+++ scorched/src/GLW/GLWListView.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -107,7 +107,7 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, sizeof(text), fmt, ap);
 	va_end(ap);	
 
 	lines_.push_back(text);
diff -ur scorched.orig/src/GLW/GLWScorchedInfo.cpp scorched/src/GLW/GLWScorchedInfo.cpp
--- scorched.orig/src/GLW/GLWScorchedInfo.cpp	2005-02-13 01:05:13.000000000 +0100
+++ scorched/src/GLW/GLWScorchedInfo.cpp	2006-02-11 15:11:46.000000000 +0100
@@ -86,7 +86,7 @@
 			}
 			else
 			{
-				sprintf(buffer, "Force %.0f", 
+				snprintf(buffer, sizeof(buffer), "Force %.0f", 
 					ScorchedClient::instance()->
 					getOptionsTransient().getWindSpeed());
 			}
@@ -237,7 +237,7 @@
 			setToolTip(&model->getTips()->weaponTip);
 
 			static char buffer[256];
-			sprintf(buffer, "%s", 
+			snprintf(buffer, sizeof(buffer), "%s",
 				current->getAccessories().getWeapons().getCurrent()->getName());
 			float weaponWidth = (float) GLWFont::instance()->getSmallPtFont()->
 				getWidth(fontSize_, buffer);
Only in scorched/src/GLW: GLWScorchedInfo.cpp~
Only in scorched/src/GLW: GLWSelectorPart.cpp.orig
diff -ur scorched.orig/src/GLW/GLWToolTip.cpp scorched/src/GLW/GLWToolTip.cpp
--- scorched.orig/src/GLW/GLWToolTip.cpp	2005-08-12 16:20:11.000000000 +0200
+++ scorched/src/GLW/GLWToolTip.cpp	2006-02-11 15:07:49.000000000 +0100
@@ -58,7 +58,7 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, TEXT_SIZE, fmt, ap);
 	va_end(ap);
 
 	texts_.clear();
Only in scorched/src/GLW: GLWToolTip.cpp~
diff -ur scorched.orig/src/XML/XMLParser.cpp scorched/src/XML/XMLParser.cpp
--- scorched.orig/src/XML/XMLParser.cpp	2005-07-03 01:50:03.000000000 +0200
+++ scorched/src/XML/XMLParser.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -91,7 +91,7 @@
 	name_(name), parent_(0), type_(type)
 {
 	char buffer[20];
-	sprintf(buffer, "%.2f", content);
+	snprintf(buffer, sizeof(buffer), "%.2f", content);
 	content_ = buffer;
 }
 
@@ -460,7 +460,8 @@
 	XML_Error errorCode = XML_GetErrorCode(p_);
 
 	static char message[1024];
-	sprintf(message, "Parse Error, File %s: Line:%i Col:%i Error:%s",
+	snprintf(message, sizeof(message),
+		"Parse Error, File %s: Line:%i Col:%i Error:%s",
 		source_.c_str(),
 		XML_GetCurrentLineNumber(p_),
 		XML_GetCurrentColumnNumber(p_),
diff -ur scorched.orig/src/client/ServerBrowserServerList.cpp scorched/src/client/ServerBrowserServerList.cpp
--- scorched.orig/src/client/ServerBrowserServerList.cpp	2005-06-08 19:29:38.000000000 +0200
+++ scorched/src/client/ServerBrowserServerList.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -54,7 +54,7 @@
 {
 	// Create the message that will be sent to the master server
 	static char buffer[1024];
-	sprintf(buffer, 
+	snprintf(buffer, sizeof(buffer),
 		"GET %s/servers.php HTTP/1.0\r\n"
 		"User-Agent: Scorched3D\r\n"
 		"Host: %s\r\n"
diff -ur scorched.orig/src/client/SpeedChange.cpp scorched/src/client/SpeedChange.cpp
--- scorched.orig/src/client/SpeedChange.cpp	2004-11-22 00:19:51.000000000 +0100
+++ scorched/src/client/SpeedChange.cpp	2006-02-11 15:12:44.000000000 +0100
@@ -58,7 +58,7 @@
 	{
 		GLState state(GLState::BLEND_ON | GLState::TEXTURE_OFF); 
 		static char buffer[10];
-		sprintf(buffer, "%.1fX", speed);
+		snprintf(buffer, sizeof(buffer), "%.1fX", speed);
 
 		static Vector fontColor(0.7f, 0.7f, 0.2f);
 		GLWFont::instance()->getLargePtFont()->draw(fontColor, 20, 10.0f, 10.0f, 0.0f, buffer);
Only in scorched/src/client: SpeedChange.cpp~
diff -ur scorched.orig/src/common/ARGParser.cpp scorched/src/common/ARGParser.cpp
--- scorched.orig/src/common/ARGParser.cpp	2005-07-24 21:34:00.000000000 +0200
+++ scorched/src/common/ARGParser.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -102,7 +102,7 @@
 		else
 		{
 			char buffer[255];
-			sprintf(buffer, "ERROR: Unknown parameter : \"%s\"\n\n", firstCommand.c_str());
+			snprintf(buffer, sizeof(buffer), "ERROR: Unknown parameter : \"%s\"\n\n", firstCommand.c_str());
 			showArgs(buffer);
 			return false;
 		}
@@ -249,7 +249,7 @@
 		else if (itor->second.destI || itor->second.destInt) type = "<int>";
 
 		char buffer2[255];
-		sprintf(buffer2, "\t%s %s", itor->first.c_str(), type);
+		snprintf(buffer2, sizeof(buffer2), "\t%s %s", itor->first.c_str(), type);
 		if (itor->second.help.size())
 		{
 			strcat(buffer2, std::string(abs(30 - int(strlen(buffer2))), ' ').c_str());
diff -ur scorched.orig/src/common/Defines.cpp scorched/src/common/Defines.cpp
--- scorched.orig/src/common/Defines.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/common/Defines.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -72,7 +72,7 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, sizeof(text), fmt, ap);
 	va_end(ap);
 
 #ifdef _WIN32
@@ -93,21 +93,14 @@
 
 void dialogAssert(const char *lineText, const int line, const char *file)
 {
-	// Dont use formatString here as this method is called by formatString.
-	char buffer[20048];
-	sprintf(buffer, "%s\n%i:%s", lineText, line, file);
-	dialogMessage("Program Assert", buffer);
+	dialogMessage("Program Assert", "%s\n%i:%s", lineText, line, file);
 	exit(64);
 }
 
 const char *formatStringList(const char *format, va_list ap)
 {
 	static char buffer[20048];
-	buffer[sizeof(buffer) - 1] = '\0';
-	vsprintf(buffer, format, ap);
-	if (buffer[sizeof(buffer) - 1] != 0) 
-		dialogAssert("buffer[sizeof(buffer) - 1] == 0", __LINE__, __FILE__);
-
+	vsnprintf(buffer, sizeof(buffer), format, ap);
 	return buffer;
 }
 
@@ -160,18 +153,20 @@
 	static char buffer[1024];
 	va_list ap;
 	va_start(ap, file);
-	vsprintf(filename, file, ap);
+	vsnprintf(filename, sizeof(filename), file, ap);
 	va_end(ap);
 
-	sprintf(buffer, getModFile("%s/%s", DefinesUtil::getDataFileMod(), filename));
+	snprintf(buffer, sizeof(buffer), "%s",
+		getModFile("%s/%s", DefinesUtil::getDataFileMod(), filename));
 	DefinesUtil::fileDos2Unix(buffer);
 	if (DefinesUtil::fileExists(buffer)) return buffer;
 
-	sprintf(buffer, getGlobalModFile("%s/%s", DefinesUtil::getDataFileMod(), filename));
+	snprintf(buffer, sizeof(buffer), "%s",
+		 getGlobalModFile("%s/%s", DefinesUtil::getDataFileMod(), filename));
 	DefinesUtil::fileDos2Unix(buffer);
 	if (DefinesUtil::fileExists(buffer)) return buffer;
 
-	sprintf(buffer, S3D_DATADIR "/%s", filename);
+	snprintf(buffer, sizeof(buffer), S3D_DATADIR "/%s", filename);
 	DefinesUtil::fileDos2Unix(buffer);
 
 	return buffer;
@@ -182,7 +177,7 @@
 	static char filename[1024];
 	va_list ap;
 	va_start(ap, file);
-	vsprintf(filename, file, ap);
+	vsnprintf(filename, sizeof(filename), file, ap);
 	va_end(ap);
 
 	const char *dataFileName = getDataFile(filename);
@@ -205,9 +200,9 @@
 	static char buffer[1024];
 	va_list ap;
 	va_start(ap, file);
-	vsprintf(filename, file, ap);
+	vsnprintf(filename, sizeof(filename), file, ap);
 	va_end(ap);
-	sprintf(buffer, S3D_DOCDIR "/%s", filename);
+	snprintf(buffer, sizeof(buffer), S3D_DOCDIR "/%s", filename);
 	DefinesUtil::fileDos2Unix(buffer);
 	return buffer;
 }
@@ -217,7 +212,7 @@
 	static char filename[1024];
 	va_list ap;
 	va_start(ap, file);
-	vsprintf(filename, file, ap);
+	vsnprintf(filename, sizeof(filename), file, ap);
 	va_end(ap);
 
 	static std::string homeDir;
@@ -231,7 +226,7 @@
 	}
 
 	static char buffer[1024];
-	sprintf(buffer, "%s/%s", homeDir.c_str(), filename);
+	snprintf(buffer, sizeof(buffer), "%s/%s", homeDir.c_str(), filename);
 	DefinesUtil::fileDos2Unix(buffer);
 	return buffer;
 }
@@ -242,7 +237,7 @@
 	
 	va_list ap;
 	va_start(ap, file);
-	vsprintf(filename, file, ap);
+	vsnprintf(filename, sizeof(filename), file, ap);
 	va_end(ap);
 
 	static std::string homeDir;
@@ -261,7 +256,7 @@
 	}
 
 	static char buffer[1024];
-	sprintf(buffer, "%s/%s", homeDir.c_str(), filename);
+	snprintf(buffer, sizeof(buffer), "%s/%s", homeDir.c_str(), filename);
 	DefinesUtil::fileDos2Unix(buffer);
 	return buffer;
 }
@@ -272,7 +267,7 @@
 	static char buffer[1024];
 	va_list ap;
 	va_start(ap, file);
-	vsprintf(filename, file, ap);
+	vsnprintf(filename, sizeof(filename), file, ap);
 	va_end(ap);
 
 	const char *homeDirStr = getSettingsFile("");
@@ -280,7 +275,7 @@
 	if (DefinesUtil::dirExists(newDir.c_str())) homeDirStr = newDir.c_str();
 	else if (DefinesUtil::dirMake(newDir.c_str())) homeDirStr = newDir.c_str();
 
-	sprintf(buffer, "%s/%s", homeDirStr, filename);
+	snprintf(buffer, sizeof(buffer), "%s/%s", homeDirStr, filename);
 	DefinesUtil::fileDos2Unix(buffer);
 	return buffer;
 }
@@ -290,7 +285,7 @@
 	static char filename[1024];
 	va_list ap;
 	va_start(ap, file);
-	vsprintf(filename, file, ap);
+	vsnprintf(filename, sizeof(filename), file, ap);
 	va_end(ap);
 
 	static char buffer[1024];
@@ -299,7 +294,7 @@
 	if (DefinesUtil::dirExists(newDir.c_str())) homeDirStr = newDir.c_str();
 	else if (DefinesUtil::dirMake(newDir.c_str())) homeDirStr = newDir.c_str();
 
-	sprintf(buffer, "%s/%s", homeDirStr, filename);
+	snprintf(buffer, sizeof(buffer), "%s/%s", homeDirStr, filename);
 	DefinesUtil::fileDos2Unix(buffer);
 	return buffer;
 }
@@ -309,7 +304,7 @@
 	static char filename[1024];
 	va_list ap;
 	va_start(ap, file);
-	vsprintf(filename, file, ap);
+	vsnprintf(filename, sizeof(filename), file, ap);
 	va_end(ap);
 
 	static std::string modDir;
@@ -324,7 +319,7 @@
 	}
 	         
 	static char buffer[1024];
-	sprintf(buffer, "%s/%s", modDir.c_str(), filename);
+	snprintf(buffer, sizeof(buffer), "%s/%s", modDir.c_str(), filename);
 	DefinesUtil::fileDos2Unix(buffer);
 	return buffer;
 }
@@ -334,11 +329,11 @@
 	static char filename[1024];
 	va_list ap;
 	va_start(ap, file);
-	vsprintf(filename, file, ap);
+	vsnprintf(filename, sizeof(filename), file, ap);
 	va_end(ap);
 
 	static char buffer[1024];
-	sprintf(buffer, S3D_DATADIR "/data/globalmods/%s", filename);
+	snprintf(buffer, sizeof(buffer), S3D_DATADIR "/data/globalmods/%s", filename);
 	DefinesUtil::fileDos2Unix(buffer);
 	return buffer;
 }
diff -ur scorched.orig/src/common/FileLines.cpp scorched/src/common/FileLines.cpp
--- scorched.orig/src/common/FileLines.cpp	2004-11-09 00:43:23.000000000 +0100
+++ scorched/src/common/FileLines.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -96,7 +96,7 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, sizeof(text), fmt, ap);
 	va_end(ap);
 
 	fileLines_.push_back(text);
diff -ur scorched.orig/src/common/Logger.cpp scorched/src/common/Logger.cpp
--- scorched.orig/src/common/Logger.cpp	2005-06-20 02:35:08.000000000 +0200
+++ scorched/src/common/Logger.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -87,7 +87,7 @@
 	static char text[2048];
 	va_list ap;
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, sizeof(text), fmt, ap);
 	va_end(ap);
 
 	LoggerInfo info;
diff -ur scorched.orig/src/common/StatsLoggerFile.cpp scorched/src/common/StatsLoggerFile.cpp
--- scorched.orig/src/common/StatsLoggerFile.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/common/StatsLoggerFile.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -124,7 +124,7 @@
 	if (nl) *nl = '\0';
 
 	char message[1024];
-	sprintf(message, "fired \"%s\" [%s] \"%s\"", 
+	snprintf(message, sizeof(message), "fired \"%s\" [%s] \"%s\"", 
 		firedTank->getName(), firedTank->getUniqueId(),
 		weapon->getParent()->getName());
 
@@ -143,7 +143,7 @@
 	if (nl) *nl = '\0';
 
 	char message[1024];
-	sprintf(message, "resigined \"%s\" [%s]", 
+	snprintf(message, sizeof(message), "resigined \"%s\" [%s]", 
 		resignedTank->getName(), resignedTank->getUniqueId());
 	LoggerInfo info(LoggerInfo::TypeNormal, message, time);
 	statsLogger_->logMessage(info);
@@ -160,7 +160,7 @@
 	if (nl) *nl = '\0';
 
 	char message[1024];
-	sprintf(message, "joined \"%s\" [%s]", 
+	snprintf(message, sizeof(message), "joined \"%s\" [%s]", 
 		tank->getName(), tank->getUniqueId());
 	LoggerInfo info(LoggerInfo::TypeNormal, message, time);
 	statsLogger_->logMessage(info);
@@ -177,7 +177,7 @@
 	if (nl) *nl = '\0';
 
 	char message[1024];
-	sprintf(message, "connected \"%s\" [%s]", 
+	snprintf(message, sizeof(message), "connected \"%s\" [%s]", 
 		tank->getName(), tank->getUniqueId());
 	LoggerInfo info(LoggerInfo::TypeNormal, message, time);
 	statsLogger_->logMessage(info);
@@ -194,7 +194,7 @@
 	if (nl) *nl = '\0';
 
 	char message[1024];
-	sprintf(message, "disconnected \"%s\" [%s]", 
+	snprintf(message, sizeof(message), "disconnected \"%s\" [%s]", 
 		tank->getName(), tank->getUniqueId());
 	LoggerInfo info(LoggerInfo::TypeNormal, message, time);
 	statsLogger_->logMessage(info);
@@ -211,7 +211,7 @@
 	if (nl) *nl = '\0';
 
 	char message[1024];
-	sprintf(message, "killed \"%s\" [%s] \"%s\" [%s] \"%s\"", 
+	snprintf(message, sizeof(message), "killed \"%s\" [%s] \"%s\" [%s] \"%s\"", 
 		firedTank->getName(), firedTank->getUniqueId(),
 		deadTank->getName(), deadTank->getUniqueId(),
 		weapon->getParent()->getName());
@@ -230,7 +230,7 @@
 	if (nl) *nl = '\0';
 
 	char message[1024];
-	sprintf(message, "teamkilled \"%s\" [%s] \"%s\" [%s] \"%s\"", 
+	snprintf(message, sizeof(message), "teamkilled \"%s\" [%s] \"%s\" [%s] \"%s\"", 
 		firedTank->getName(), firedTank->getUniqueId(),
 		deadTank->getName(), deadTank->getUniqueId(),
 		weapon->getParent()->getName());
@@ -249,7 +249,7 @@
 	if (nl) *nl = '\0';
 
 	char message[1024];
-	sprintf(message, "selfkilled \"%s\" [%s] \"%s\"", 
+	snprintf(message, sizeof(message), "selfkilled \"%s\" [%s] \"%s\"", 
 		firedTank->getName(), firedTank->getUniqueId(),
 		weapon->getParent()->getName());
 	LoggerInfo info(LoggerInfo::TypeNormal, message, time);
@@ -267,7 +267,7 @@
 	if (nl) *nl = '\0';
 
 	char message[1024];
-	sprintf(message, "won \"%s\" [%s]", 
+	snprintf(message, sizeof(message), "won \"%s\" [%s]", 
 		tank->getName(), tank->getUniqueId());
 	LoggerInfo info(LoggerInfo::TypeNormal, message, time);
 	statsLogger_->logMessage(info);
@@ -284,7 +284,7 @@
 	if (nl) *nl = '\0';
 
 	char message[1024];
-	sprintf(message, "overallwinner \"%s\" [%s]", 
+	snprintf(message, sizeof(message), "overallwinner \"%s\" [%s]", 
 		tank->getName(), tank->getUniqueId());
 	LoggerInfo info(LoggerInfo::TypeNormal, message, time);
 	statsLogger_->logMessage(info);
@@ -301,7 +301,7 @@
 	if (nl) *nl = '\0';
 
 	char message[1024];
-	sprintf(message, "weaponfired \"%s\"", weapon->getParent()->getName());
+	snprintf(message, sizeof(message), "weaponfired \"%s\"", weapon->getParent()->getName());
 	LoggerInfo info(LoggerInfo::TypeNormal, message, time);
 	statsLogger_->logMessage(info);
 }
@@ -317,7 +317,7 @@
 	if (nl) *nl = '\0';
 
 	char message[1024];
-	sprintf(message, "weaponkilled \"%s\"", weapon->getParent()->getName());
+	snprintf(message, sizeof(message), "weaponkilled \"%s\"", weapon->getParent()->getName());
 	LoggerInfo info(LoggerInfo::TypeNormal, message, time);
 	statsLogger_->logMessage(info);
 }
diff -ur scorched.orig/src/common/StatsLoggerMySQL.cpp scorched/src/common/StatsLoggerMySQL.cpp
--- scorched.orig/src/common/StatsLoggerMySQL.cpp	2005-08-08 11:37:24.000000000 +0200
+++ scorched/src/common/StatsLoggerMySQL.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -63,7 +63,7 @@
 	static char text[50000];
 	va_list ap;
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, sizeof(text), fmt, ap);
 	va_end(ap);
 
 	return (mysql_real_query(mysql_, text, strlen(text)) == 0);
diff -ur scorched.orig/src/coms/ComsConnectMessage.h scorched/src/coms/ComsConnectMessage.h
--- scorched.orig/src/coms/ComsConnectMessage.h	2005-07-21 22:34:24.000000000 +0200
+++ scorched/src/coms/ComsConnectMessage.h	2006-02-11 15:02:03.000000000 +0100
@@ -47,7 +47,7 @@
 	void setUniqueId(const char *uid) { setValue("uid", uid); }
 	void setHostDesc(const char *host) { setValue("host", host); }
 	void setNoPlayers(unsigned int players) { 
-		char buf[10]; sprintf(buf, "%i", players); setValue("numplayers", buf); }
+		char buf[11]; sprintf(buf, "%u", players); setValue("numplayers", buf); }
 
 	const char *getVersion() { return getValue("version"); }
 	const char *getProtocolVersion() { return getValue("pversion"); }
diff -ur scorched.orig/src/coms/ComsMessageHandler.cpp scorched/src/coms/ComsMessageHandler.cpp
--- scorched.orig/src/coms/ComsMessageHandler.cpp	2005-04-05 00:35:25.000000000 +0200
+++ scorched/src/coms/ComsMessageHandler.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -114,7 +114,8 @@
 	if (itor == handlerMap_.end())
 	{
 		char buffer[1024];
-		sprintf(buffer, "Failed to find message type handler \"%s\"",
+		snprintf(buffer, sizeof(buffer),
+			"Failed to find message type handler \"%s\"",
 			messageType.c_str());
 
 		if (connectionHandler_)
@@ -129,7 +130,8 @@
 		messageTypeStr, reader))
 	{
 		char buffer[1024];
-		sprintf(buffer, "Failed to handle message type \"%s\"",
+		snprintf(buffer, sizeof(buffer),
+			"Failed to handle message type \"%s\"",
 			messageType.c_str());
 
 		if (connectionHandler_)
diff -ur scorched.orig/src/dialogs/AutoDefenseDialog.cpp scorched/src/dialogs/AutoDefenseDialog.cpp
--- scorched.orig/src/dialogs/AutoDefenseDialog.cpp	2005-07-19 23:45:36.000000000 +0200
+++ scorched/src/dialogs/AutoDefenseDialog.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -173,13 +173,13 @@
 		char buffer[256];
 		if (shieldcount > 0)
 		{
-			sprintf(buffer, "%s (%i)",
+			snprintf(buffer, sizeof(buffer), "%s (%i)",
 				shield->getName(),
 				shieldcount);
 		}
 		else
 		{
-			sprintf(buffer, "%s (In)",
+			snprintf(buffer, sizeof(buffer), "%s (In)",
 				shield->getName());
 		}
 		ddshields_->addText(GLWSelectorEntry(buffer,
@@ -215,13 +215,13 @@
 		char buffer[256];
 		if (tank->getAccessories().getShields().getShieldCount(currentShield) > 0)
 		{
-			sprintf(buffer, "%s (%i)",
+			snprintf(buffer, sizeof(buffer), "%s (%i)",
 				currentShield->getName(),
 				tank->getAccessories().getShields().getShieldCount(currentShield));
 		}
 		else
 		{
-			sprintf(buffer, "%s (In)",
+			snprintf(buffer, sizeof(buffer), "%s (In)",
 				currentShield->getName());
 		}
 		ddshields_->setText(buffer);
diff -ur scorched.orig/src/ode/error.cpp scorched/src/ode/error.cpp
--- scorched.orig/src/ode/error.cpp	2004-09-15 00:10:04.000000000 +0200
+++ scorched/src/ode/error.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -129,7 +129,7 @@
   else {
     char s[1000],title[100];
     sprintf (title,"ODE Error %d",num);
-    vsprintf (s,msg,ap);
+    vsnprintf (s,sizeof(s),msg,ap);
     s[sizeof(s)-1] = 0;
     MessageBox(0,s,title,MB_OK | MB_ICONWARNING);
   }
@@ -145,7 +145,7 @@
   else {
     char s[1000],title[100];
     sprintf (title,"ODE INTERNAL ERROR %d",num);
-    vsprintf (s,msg,ap);
+    vsnprintf (s,sizeof(s),msg,ap);
     s[sizeof(s)-1] = 0;
     MessageBox(0,s,title,MB_OK | MB_ICONSTOP);
   }
diff -ur scorched.orig/src/ode/testing.cpp scorched/src/ode/testing.cpp
--- scorched.orig/src/ode/testing.cpp	2003-07-10 18:30:19.000000000 +0200
+++ scorched/src/ode/testing.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -72,7 +72,7 @@
 
     va_list ap;
     va_start (ap,name);
-    vsprintf (mi->name,name,ap);
+    vsnprintf (mi->name, sizeof(mi->name), name, ap);
     if (strlen(mi->name) >= sizeof (mi->name)) dDebug (0,"name too long");
 
     mat.push (mi);
@@ -88,7 +88,7 @@
     dMatInfo mi;
     va_list ap;
     va_start (ap,name);
-    vsprintf (mi.name,name,ap);
+    vsnprintf (mi.name, sizeof(mi.name), name, ap);
     if (strlen(mi.name) >= sizeof (mi.name)) dDebug (0,"name too long");
 
     if (strcmp(mp->name,mi.name) != 0)
diff -ur scorched.orig/src/scorched/DisplayDialog.cpp scorched/src/scorched/DisplayDialog.cpp
--- scorched.orig/src/scorched/DisplayDialog.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/scorched/DisplayDialog.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -265,8 +265,8 @@
 			const char *stateName = "";
 			KeyboardKey::translateKeyNameValue(key->getKeys()[position].key, keyName);
 			KeyboardKey::translateKeyStateValue(key->getKeys()[position].state, stateName);
-			if (strcmp(stateName, "NONE") == 0) sprintf(buffer, "%s", keyName);
-			else sprintf(buffer, "<%s> %s", stateName, keyName);
+			if (strcmp(stateName, "NONE") == 0) snprintf(buffer, sizeof(buffer), "%s", keyName);
+			else snprintf(buffer, sizeof(buffer), "<%s> %s", stateName, keyName);
 		}
 		button->SetLabel(wxString(buffer, wxConvUTF8));
 	}
diff -ur scorched.orig/src/scorched/MainDialog.cpp scorched/src/scorched/MainDialog.cpp
--- scorched.orig/src/scorched/MainDialog.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/scorched/MainDialog.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -143,11 +143,11 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, sizeof(text), fmt, ap);
 	va_end(ap);
 
 	char path[1024];
-	sprintf(path, "%s %s", exeName, text);
+	snprintf(path, sizeof(path), "%s %s", exeName, text);
 
 	ScorchedProcess *process = new ScorchedProcess();
 	long result = ::wxExecute(wxString(path, wxConvUTF8), wxEXEC_ASYNC, process);
diff -ur scorched.orig/src/scorched/NetDialog.cpp scorched/src/scorched/NetDialog.cpp
--- scorched.orig/src/scorched/NetDialog.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/scorched/NetDialog.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -127,7 +127,7 @@
 				ServerBrowser::instance()->getServerList().
 					getEntryValue(item, "maxplayers");
 			char text[256];
-			sprintf(text, "%s/%s", clients.c_str(), maxclients.c_str());
+			snprintf(text, sizeof(text), "%s/%s", clients.c_str(), maxclients.c_str());
 
 			return wxString(text, wxConvUTF8);
 		}
@@ -498,7 +498,7 @@
 		wxString username = IDC_EDIT_NAME_CTRL->GetValue();
 
 		char buffer[1024];
-		sprintf(buffer, "-connect \"%s\"", (const char *) value.mb_str(wxConvUTF8));
+		snprintf(buffer, sizeof(buffer), "-connect \"%s\"", (const char *) value.mb_str(wxConvUTF8));
 
 		if (!password.empty())
 		{
diff -ur scorched.orig/src/scorched/ServerDialog.cpp scorched/src/scorched/ServerDialog.cpp
--- scorched.orig/src/scorched/ServerDialog.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/scorched/ServerDialog.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -402,7 +402,7 @@
 	{
 		TankAI *ai = (*aiitor);
 		char buffer[256];
-		sprintf(buffer, "Add %s", ai->getName());
+		snprintf(buffer, sizeof(buffer), "Add %s", ai->getName());
 		menuAddPlayer->Append(IDC_MENU_PLAYERADD_1 + aicount, wxString(buffer, wxConvUTF8));
 	}
 
@@ -841,7 +841,8 @@
 void showServerDialog()
 {
 	char serverName[1024];
-	sprintf(serverName, "Scorched 3D Dedicated Server [ %s : %i ] [%s]",
+	snprintf(serverName, sizeof(serverName),
+			"Scorched 3D Dedicated Server [ %s : %i ] [%s]",
 			ScorchedServer::instance()->getOptionsGame().getServerName(), 
 			ScorchedServer::instance()->getOptionsGame().getPortNo(), 
 			(ScorchedServer::instance()->getOptionsGame().getPublishServer()?"Published":"Not Published"));
diff -ur scorched.orig/src/scorched/SettingsDialog.cpp scorched/src/scorched/SettingsDialog.cpp
--- scorched.orig/src/scorched/SettingsDialog.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/scorched/SettingsDialog.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -417,7 +417,7 @@
 			(void *) (OptionsGame::WindRandom));
 		for (int i=0; i<=5; i++)
 		{
-			char buffer[25];
+			char buffer[30];
 			sprintf(buffer, "Force %i%s", i, ((i==0)?" (No Wind)":""));
 			SettingsEnv::IDC_COMBO_FORCE_CTRL->Append(
 				wxString(buffer, wxConvUTF8), (void *) (i+1));
@@ -471,7 +471,7 @@
 		for (int i=0; i<=20; i++)
 		{
 			char buffer[25];
-			sprintf(buffer, "%i", i, i);
+			sprintf(buffer, "%i", i);
 			if (i<=10)
 			{
 				SettingsEnv::IDC_COMBO_STARTARMSLEVEL_CTRL->Append(wxString(buffer, wxConvUTF8), (void *) i);
Only in scorched/src/scorched: SingleChoiceDialog.cpp.orig
diff -ur scorched.orig/src/scorched/main.cpp scorched/src/scorched/main.cpp
--- scorched.orig/src/scorched/main.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/scorched/main.cpp	2006-02-11 15:06:24.000000000 +0100
@@ -145,7 +145,8 @@
 int main(int argc, char *argv[])
 {
 	// Generate the version
-	sprintf(scorched3dAppName, "Scorched3D - Version %s (%s)", 
+	snprintf(scorched3dAppName, sizeof(scorched3dAppName),
+		"Scorched3D - Version %s (%s)", 
 		ScorchedVersion, ScorchedProtocolVersion);
 
 	srand((unsigned)time(0));
Only in scorched/src/scorched: main.cpp~
diff -ur scorched.orig/src/server/ServerBrowserInfo.cpp scorched/src/server/ServerBrowserInfo.cpp
--- scorched.orig/src/server/ServerBrowserInfo.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/server/ServerBrowserInfo.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -138,7 +138,7 @@
 {
 	char *serverName = (char *) ScorchedServer::instance()->getOptionsGame().getServerName();
 	char version[256];
-	sprintf(version, "%s (%s)", ScorchedVersion, ScorchedProtocolVersion);
+	snprintf(version, sizeof(version), "%s (%s)", ScorchedVersion, ScorchedProtocolVersion);
 	unsigned currentState = ScorchedServer::instance()->getGameState().getState();
 	bool started = !ServerTooFewPlayersStimulus::instance()->acceptStateChange(0, 0, 0.0f);
 	char players[25];
@@ -146,7 +146,7 @@
 	char maxplayers[25];
 	sprintf(maxplayers, "%i", ScorchedServer::instance()->getOptionsGame().getNoMaxPlayers());
 	char type[100];
-	sprintf(type, "%s (%s)", 
+	snprintf(type, sizeof(type), "%s (%s)", 
 		ScorchedServer::instance()->getOptionsTransient().getGameType(),
 		((ScorchedServer::instance()->getOptionsGame().getTeams() > 1)?"Teams":"No Teams"));
 	wxString osDesc = ::wxGetOsDescription();
diff -ur scorched.orig/src/server/ServerCommon.cpp scorched/src/server/ServerCommon.cpp
--- scorched.orig/src/server/ServerCommon.cpp	2005-08-14 21:11:42.000000000 +0200
+++ scorched/src/server/ServerCommon.cpp	2006-02-11 15:12:42.000000000 +0100
@@ -63,7 +63,7 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, sizeof(text), fmt, ap);
 	va_end(ap);	
 
 	ComsTextMessage message(text, 0, true);
@@ -83,7 +83,7 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, sizeof(text), fmt, ap);
 	va_end(ap);	
 
 	ComsTextMessage message(text);
@@ -104,7 +104,7 @@
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(text, fmt, ap);
+	vsnprintf(text, sizeof(text), fmt, ap);
 	va_end(ap);	
 
 	std::map<unsigned int, Tank *> &tanks = 
@@ -295,7 +295,7 @@
 		// Add the actual log message
 		va_list ap;
 		va_start(ap, fmt);
-		vsprintf(text, fmt, ap);
+		vsnprintf(text, sizeof(text), fmt, ap);
 		va_end(ap);
 
 		Logger::log(text);
Only in scorched/src/server: ServerCommon.cpp~
diff -ur scorched.orig/src/server/ServerRegistration.cpp scorched/src/server/ServerRegistration.cpp
--- scorched.orig/src/server/ServerRegistration.cpp	2005-06-08 19:29:38.000000000 +0200
+++ scorched/src/server/ServerRegistration.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -39,7 +39,7 @@
 	netServer_(new NetServerHTTPProtocolSend)
 {
 	static char buffer[1024];
-	sprintf(buffer, 
+	snprintf(buffer, sizeof(buffer),
 		"GET %s/servers.php?register=%s&port=%i HTTP/1.0\r\n"
 		"User-Agent: Scorched3D\r\n"
 		"Host: %s\r\n"
diff -ur scorched.orig/src/tank/TankPhysics.cpp scorched/src/tank/TankPhysics.cpp
--- scorched.orig/src/tank/TankPhysics.cpp	2005-06-11 18:53:41.000000000 +0200
+++ scorched/src/tank/TankPhysics.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -248,13 +248,13 @@
 
 	if (OptionsDisplay::instance()->getUseHexidecimal())
 	{
-		sprintf(messageBuffer, "0x%x (0x%x)", 
+		snprintf(messageBuffer, sizeof(messageBuffer), "0x%x (0x%x)", 
 				int(360.0f - getRotationGunXY()),
 				int(rotDiff));
 	}
 	else
 	{
-		sprintf(messageBuffer, "%.1f (%+.1f)", 
+		snprintf(messageBuffer, sizeof(messageBuffer), "%.1f (%+.1f)", 
 				360.0f - getRotationGunXY(),
 				rotDiff);
 	}
@@ -269,13 +269,13 @@
 
 	if (OptionsDisplay::instance()->getUseHexidecimal())
 	{
-		sprintf(messageBuffer, "0x%x (0X%x)", 
+		snprintf(messageBuffer, sizeof(messageBuffer), "0x%x (0X%x)", 
 				int(getRotationGunYZ()),
 				int(rotDiff));
 	}
 	else
 	{
-		sprintf(messageBuffer, "%.1f (%+.1f)", 
+		snprintf(messageBuffer, sizeof(messageBuffer), "%.1f (%+.1f)", 
 				getRotationGunYZ(),
 				rotDiff);
 	}
@@ -289,13 +289,13 @@
 
 	if (OptionsDisplay::instance()->getUseHexidecimal())
 	{
-		sprintf(messageBuffer, "0X%x (0X%x)", 		
+		snprintf(messageBuffer, sizeof(messageBuffer), "0X%x (0X%x)", 		
 				int(getPower()),
 				int(powDiff));
 	}
 	else
 	{
-		sprintf(messageBuffer, "%.1f (%+.1f)", 		
+		snprintf(messageBuffer, sizeof(messageBuffer), "%.1f (%+.1f)", 		
 				getPower(),
 				powDiff);
 	}
diff -ur scorched.orig/src/tank/TankState.cpp scorched/src/tank/TankState.cpp
--- scorched.orig/src/tank/TankState.cpp	2005-07-17 13:32:05.000000000 +0200
+++ scorched/src/tank/TankState.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -88,7 +88,7 @@
 const char *TankState::getStateString()
 {
 	static char string[1024];
-	sprintf(string, "%s - %s %s(%i hp)",
+	snprintf(string, sizeof(string), "%s - %s %s(%i hp)",
 		((readyState_==sReady)?"Rdy":"Wait"),
 		getSmallStateString(),
 		(muted_?"muted ":""),
diff -ur scorched.orig/src/tank/TankWeapon.cpp scorched/src/tank/TankWeapon.cpp
--- scorched.orig/src/tank/TankWeapon.cpp	2005-07-27 01:51:21.000000000 +0200
+++ scorched/src/tank/TankWeapon.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -206,7 +206,7 @@
 {
 	static char buffer[256];
 	int count = getWeaponCount(getCurrent());
-	sprintf(buffer, ((count>0)?"%s (%i)":"%s (In)"),
+	snprintf(buffer, sizeof(buffer), ((count>0)?"%s (%i)":"%s (In)"),
 		getCurrent()->getName(), count);
 	return buffer;
 }
diff -ur scorched.orig/src/tankai/TankAIAdder.cpp scorched/src/tankai/TankAIAdder.cpp
--- scorched.orig/src/tankai/TankAIAdder.cpp	2005-04-05 00:35:25.000000000 +0200
+++ scorched/src/tankai/TankAIAdder.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -72,7 +72,7 @@
 		char uniqueId[256];
 		{
 			std::set<int> usedIds;
-			sprintf(uniqueId, "%s - computer - %%i", aiName);
+			snprintf(uniqueId, sizeof(uniqueId), "%s - computer - %%i", aiName);
 			std::map<unsigned int, Tank *> &playingTanks = 
 				context.getTankContainer().getPlayingTanks();
 			std::map<unsigned int, Tank *>::iterator playingItor;
@@ -94,7 +94,7 @@
 			int uniqueIdCount = 1;
 			while (usedIds.find(uniqueIdCount) != usedIds.end()) uniqueIdCount++;
 
-			sprintf(uniqueId, "%s - computer - %i", aiName, uniqueIdCount);
+			snprintf(uniqueId, sizeof(uniqueId), "%s - computer - %i", aiName, uniqueIdCount);
 		}
 
 		std::string newname = name;
diff -ur scorched.orig/src/tankgraph/GLWTankTip.cpp scorched/src/tankgraph/GLWTankTip.cpp
--- scorched.orig/src/tankgraph/GLWTankTip.cpp	2006-02-11 15:02:47.000000000 +0100
+++ scorched/src/tankgraph/GLWTankTip.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -50,7 +50,7 @@
 	for (int i=0; i<(int) oldShots.size(); i++)
 	{
 		char buffer[128];
-		sprintf(buffer, "%s%i: Pwr:%.1f Ele:%.1f Rot:%.1f",
+		snprintf(buffer, sizeof(buffer), "%s%i: Pwr:%.1f Ele:%.1f Rot:%.1f",
 			(oldShots[i].current?"* ":"  "),
 			i, oldShots[i].power, oldShots[i].ele,
 			(360.0f - oldShots[i].rot));
@@ -211,13 +211,13 @@
 		char buffer[128];
 		if (count >= 0)
 		{
-			sprintf(buffer, "%s (%i)", 
+			snprintf(buffer, sizeof(buffer), "%s (%i)", 
 				current->getName(),
 				count);
 		}
 		else
 		{
-			sprintf(buffer, "%s (In)",
+			snprintf(buffer, sizeof(buffer), "%s (In)",
 				current->getName());
 		}
 		entries.push_back(GLWSelectorEntry(buffer, &current->getToolTip(), 
@@ -432,13 +432,13 @@
 		char buffer[128];
 		if (count > 0)
 		{
-			sprintf(buffer, "%s (%i)", 
+			snprintf(buffer, sizeof(buffer), "%s (%i)", 
 				weapon->getName(),
 				count);
 		}
 		else
 		{
-			sprintf(buffer, "%s (In)", 
+			snprintf(buffer, sizeof(buffer), "%s (In)", 
 				weapon->getName());
 		}
 		entries.push_back(GLWSelectorEntry(buffer, &weapon->getToolTip(), 
diff -ur scorched.orig/src/tankgraph/TankMenus.cpp scorched/src/tankgraph/TankMenus.cpp
--- scorched.orig/src/tankgraph/TankMenus.cpp	2005-07-19 23:45:37.000000000 +0200
+++ scorched/src/tankgraph/TankMenus.cpp	2006-02-11 15:02:03.000000000 +0100
@@ -193,7 +193,7 @@
 		}
 
 		char buffer[1024];
-		sprintf(buffer, "%c %8s - \"%10s\" (%s)", 
+		snprintf(buffer, 1024, "%c %8s - \"%10s\" (%s)", 
 			currentTank == tank?'>':' ',
 			description,
 			tank->getName(), modelId.getModelName());
@@ -394,12 +394,12 @@
 		static char buffer[1024];
 		if (accessoryCount > 0)
 		{
-			sprintf(buffer, "%s (%i)", 
+			snprintf(buffer, sizeof(buffer), "%s (%i)", 
 				accessory->getName(), accessoryCount);
 		}
 		else
 		{
-			sprintf(buffer, "%s (In)", 
+			snprintf(buffer, sizeof(buffer), "%s (In)", 
 				accessory->getName());
 		}
 		menuItems_.push_back(accessory);

scorched3d-strxxx.patch:

--- NEW FILE scorched3d-strxxx.patch ---
Only in scorched: aap
diff -ur scorched.orig/src/3dsparse/MSModelFactory.cpp scorched/src/3dsparse/MSModelFactory.cpp
--- scorched.orig/src/3dsparse/MSModelFactory.cpp	2006-02-11 15:32:18.000000000 +0100
+++ scorched/src/3dsparse/MSModelFactory.cpp	2006-02-11 16:10:25.000000000 +0100
@@ -80,7 +80,7 @@
 void MSModelFactory::loadFile(FILE *in, const char *fileName, Model *model)
 {
 	char filePath[256];
-	strcpy(filePath, fileName);
+	snprintf(filePath, sizeof(filePath), "%s", fileName);
 
 	char *sep;
 	while (sep=strchr(filePath, '\\')) *sep = '/';
diff -ur scorched.orig/src/3dsparse/aseFile.lex.cpp scorched/src/3dsparse/aseFile.lex.cpp
--- scorched.orig/src/3dsparse/aseFile.lex.cpp	2004-03-01 18:48:17.000000000 +0100
+++ scorched/src/3dsparse/aseFile.lex.cpp	2006-02-11 16:13:01.000000000 +0100
@@ -873,7 +873,7 @@
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
-{ strcpy(aseString, asetext ); return MAX_STRING; }
+{ snprintf(aseString, sizeof(aseString), "%s", asetext ); return MAX_STRING; }
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
Only in scorched/src/3dsparse: aseFile.lex.cpp~
diff -ur scorched.orig/src/GLEXT/GLConsoleRules.cpp scorched/src/GLEXT/GLConsoleRules.cpp
--- scorched.orig/src/GLEXT/GLConsoleRules.cpp	2003-08-01 00:37:11.000000000 +0200
+++ scorched/src/GLEXT/GLConsoleRules.cpp	2006-02-11 16:22:14.000000000 +0100
@@ -73,7 +73,7 @@
 	if (matches.size() == 1) return matches.front()->getName();
 
 	static char buffer[1024];
-	strcpy(buffer, line);
+	snprintf(buffer, sizeof(buffer), "%s", line);
 
 	int pos = (int) strlen(line);
 	while (true)
Only in scorched/src/GLEXT: GLConsoleRules.cpp~
diff -ur scorched.orig/src/GLEXT/GLState.cpp scorched/src/GLEXT/GLState.cpp
--- scorched.orig/src/GLEXT/GLState.cpp	2004-09-07 14:29:13.000000000 +0200
+++ scorched/src/GLEXT/GLState.cpp	2006-02-11 16:29:28.000000000 +0100
@@ -105,15 +105,16 @@
 {
 	static char buffer[1024];
 	buffer[0] = '\0';
-
-	if (currentState_ & TEXTURE_ON) strcat(buffer, "TEXTURE_ON\n");
-	if (currentState_ & TEXTURE_OFF) strcat(buffer, "TEXTURE_ON\n");
-	if (currentState_ & DEPTH_ON) strcat(buffer, "DEPTH_ON\n");
-	if (currentState_ & DEPTH_OFF) strcat(buffer, "DEPTH_OFF\n");
-	if (currentState_ & BLEND_ON) strcat(buffer, "BLEND_ON\n");
-	if (currentState_ & BLEND_OFF) strcat(buffer, "BLEND_OFF\n");
-	if (currentState_ & CUBEMAP_ON) strcat(buffer, "CUBEMAP_ON\n");
-	if (currentState_ & CUBEMAP_OFF) strcat(buffer, "CUBEMAP_OFF\n");
+	
+	snprintf(buffer, sizeof(buffer), "%s%s%s%s%s%s%s%s",
+		(currentState_ & TEXTURE_ON)? "TEXTURE_ON\n":"",
+		(currentState_ & TEXTURE_OFF)? "TEXTURE_ON\n":"",
+		(currentState_ & DEPTH_ON)? "DEPTH_ON\n":"",
+		(currentState_ & DEPTH_OFF)? "DEPTH_OFF\n":"",
+		(currentState_ & BLEND_ON)? "BLEND_ON\n":"",
+		(currentState_ & BLEND_OFF)? "BLEND_OFF\n":"",
+		(currentState_ & CUBEMAP_ON)? "CUBEMAP_ON\n":"",
+		(currentState_ & CUBEMAP_OFF)? "CUBEMAP_OFF\n":"");
 
 	return buffer;
 }
Only in scorched/src/GLEXT: GLState.cpp~
diff -ur scorched.orig/src/client/ServerBrowserRefresh.cpp scorched/src/client/ServerBrowserRefresh.cpp
--- scorched.orig/src/client/ServerBrowserRefresh.cpp	2003-10-17 12:38:00.000000000 +0200
+++ scorched/src/client/ServerBrowserRefresh.cpp	2006-02-11 16:15:52.000000000 +0100
@@ -72,7 +72,7 @@
 	if (!name[0]) return;
 
 	static char buffer[256];
-	strcpy(buffer, name);
+	snprintf(buffer, sizeof(buffer), "%s", name);
 	char *port = strchr(buffer, ':');
 	if (!port) return;
 	*port = '\0';
Only in scorched/src/client: ServerBrowserRefresh.cpp~
diff -ur scorched.orig/src/client/ServerBrowserServerList.cpp scorched/src/client/ServerBrowserServerList.cpp
--- scorched.orig/src/client/ServerBrowserServerList.cpp	2006-02-11 15:32:18.000000000 +0100
+++ scorched/src/client/ServerBrowserServerList.cpp	2006-02-11 16:13:53.000000000 +0100
@@ -239,7 +239,7 @@
 	SDL_LockMutex(vectorMutex_);
 	ServerBrowserEntry &entry = getEntry(pos);
 	static char buffer[256];
-	strcpy(buffer, entry.getAttribute(name));
+	snprintf(buffer, sizeof(buffer), "%s", entry.getAttribute(name));
 	SDL_UnlockMutex(vectorMutex_);
 
 	return buffer;
diff -ur scorched.orig/src/scorched/MainDialog.cpp scorched/src/scorched/MainDialog.cpp
--- scorched.orig/src/scorched/MainDialog.cpp	2006-02-11 15:32:18.000000000 +0100
+++ scorched/src/scorched/MainDialog.cpp	2006-02-11 16:17:37.000000000 +0100
@@ -77,11 +77,8 @@
 
 void setExeName(const char *name, bool allowExceptions)
 {
-	strcpy(exeName, name);
-	if (allowExceptions)
-	{
-		strcat(exeName, " -allowexceptions");
-	}
+	snprintf(exeName, sizeof(exeName), "%s%s", name,
+		allowExceptions? " -allowexceptions":"");
 }
 
 static SDL_mutex *messageMutex_ = 0;
diff -ur scorched.orig/src/scorched/main.cpp scorched/src/scorched/main.cpp
--- scorched.orig/src/scorched/main.cpp	2006-02-11 15:32:18.000000000 +0100
+++ scorched/src/scorched/main.cpp	2006-02-11 16:18:13.000000000 +0100
@@ -159,7 +159,7 @@
 	{
 		// Perhaps we can get the directory from the executables path name
 		char path[1024];
-		strcpy(path, argv[0]);
+		snprintf(path, sizeof(path), "%s", argv[0]);
 		char *sep = strrchr(path, '/');
 		if (sep)
 		{
diff -ur scorched.orig/src/server/ServerBrowserInfo.cpp scorched/src/server/ServerBrowserInfo.cpp
--- scorched.orig/src/server/ServerBrowserInfo.cpp	2006-02-11 15:32:18.000000000 +0100
+++ scorched/src/server/ServerBrowserInfo.cpp	2006-02-11 16:21:52.000000000 +0100
@@ -232,7 +232,7 @@
 {
 	static char buffer[10000];
 	static char newvalue[10000];
-	strcpy(newvalue, value);
+	snprintf(newvalue, sizeof(newvalue), "%s", value);
 	for (char *a=newvalue; *a; a++)
 	{
 		if (*a == '\'') *a='\"';
@@ -240,7 +240,6 @@
 		else if (*a == '<') *a=' ';
 	}
 
-	strcpy(buffer, name); strcat(buffer, "='");
-	strcat(buffer, newvalue); strcat(buffer, "' ");
+	snprintf(buffer, sizeof(buffer), "%s='%s' ", name, newvalue);
 	return buffer;
 }
diff -ur scorched.orig/src/skincreator/main.cpp scorched/src/skincreator/main.cpp
--- scorched.orig/src/skincreator/main.cpp	2003-08-31 13:30:48.000000000 +0200
+++ scorched/src/skincreator/main.cpp	2006-02-11 16:22:37.000000000 +0100
@@ -62,7 +62,7 @@
 	GLBitmap bitmap;
 	bitmap.grabScreen();
 	char buffer[1024];
-	strcpy(buffer, argv[1]);
+	snprintf(buffer, sizeof(buffer), "%s", argv[1]);
 	char *pos = strrchr(buffer, '.');
 	if (pos)
 	{
--- scorched/src/dialogs/ScoreDialog.cpp~	2006-02-11 20:05:20.000000000 +0100
+++ scorched/src/dialogs/ScoreDialog.cpp	2006-02-11 20:05:20.000000000 +0100
@@ -347,7 +347,8 @@
 
 	// Form the name
 	static char name[256];
-	strcpy(name, current->getName());
+	// Max strcat usage 12
+	snprintf(name, sizeof(name) - 12, "%s", current->getName());
 	if (finished && ! OptionsParam::instance()->getConnectedToServer())
 	{
 		strcat(name, " (");


Index: scorched3d.spec
===================================================================
RCS file: /cvs/extras/rpms/scorched3d/devel/scorched3d.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- scorched3d.spec	9 Feb 2006 21:57:31 -0000	1.10
+++ scorched3d.spec	11 Feb 2006 19:33:16 -0000	1.11
@@ -15,6 +15,12 @@
 Patch4:         %{name}-64bit.patch
 Patch5:         %{name}-openal.patch
 Patch6:         %{name}-help.patch
+Patch7:         %{name}-sprintf.patch
+Patch8:         %{name}-formatstring.patch
+Patch9:         %{name}-strxxx.patch
+Patch10:        %{name}-negint.patch
+Patch11:        %{name}-XML-injection.patch
+Patch12:        %{name}-HTML-injection.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  wxGTK-devel
@@ -50,13 +56,19 @@
 find . -type d -name CVS | xargs rm -r
 rm -r autom4te.cache `find . -name Makefile`
 rm -r src/zlib `find src/XML ! -name "X*"`
-%patch0 -p1 -z .cvs
-%patch1 -p1 -z .syslibs
-%patch2 -p0 -z .aclocal18
-%patch3 -p1 -z .gcc41
-%patch4 -p1 -z .64bit
-%patch5 -p1 -z .openal
-%patch6 -p1 -z .help
+%patch0 -p1
+%patch1 -p1
+%patch2 -p0
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
 . autogen.sh
 
 
@@ -98,7 +110,7 @@
 
 %files
 %defattr(-,root,root,-)
-%doc AUTHORS COPYING TODO __docs/
+%doc AUTHORS COPYING TODO __docs/*
 %{_bindir}/scorched3d
 %{_datadir}/games/scorched3d/
 %{_datadir}/applications/*scorched3d.desktop
@@ -106,15 +118,19 @@
 
 
 %changelog
-* Thu Feb  9 2006 <j.w.r.degoede at hhs.nl> - 39.1-2
+* Sat Feb 11 2006 <j.w.r.degoede at hhs.nl> - 39.1-2
 - upgrade to CVS snapshot of 20050929, as Debian does, but not to
-  the newer apoc version as this causes problems playing online
-- fix gcc41 compilation
-- fix 64 bit compilation (bz 158646)
-- fix compile with openal-0.9
+  the newer apoc version as this causes problems playing online (patch 0)
+- fix gcc41 compilation (patch 3)
+- fix 64 bit compilation (bz 158646) (patch 4)
+- fix compile with openal-0.9 (patch 5)
 - use htmlview for helpfile viewing instead of hardcoded mozilla,
-  run this in background so the game doesn't freeze
-- this release also fixes bz 161694, 173187
+  run this in background so the game doesn't freeze (patch 6)
+- fix all the security issues reported on the fulldisclosure mailinglist:
+  http://seclists.org/lists/fulldisclosure/2005/Nov/0079.html
+  (bz 161694) (patch 7, 8, 9, 10)
+- fix 2 additonal security issues found while fixing the above (patch 11, 12)
+- this release also fixes bz 161694
 
 * Sat Oct  8 2005 Ville Skyttä <ville.skytta at iki.fi> - 39.1-1
 - 39.1.


--- scorched3d-buf.patch DELETED ---




More information about the fedora-extras-commits mailing list