aboutsummaryrefslogtreecommitdiff
blob: bc02dabdde7cc3365aae9fe91423941a25666691 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
=== modified file 'arch/sdl/jukebox.c'
--- arch/sdl/jukebox.c	2010-09-26 13:15:20 +0000
+++ arch/sdl/jukebox.c	2010-10-14 14:46:20 +0000
@@ -164,7 +164,7 @@
 			if (PHYSFS_isDirectory(GameCfg.CMLevelMusicPath)) // it's a child of Sharepath, build full path
 			{
 				PHYSFSX_getRealPath(GameCfg.CMLevelMusicPath,abspath);
-				snprintf(GameCfg.CMLevelMusicPath,sizeof(char)*PATH_MAX,abspath);
+				snprintf(GameCfg.CMLevelMusicPath,sizeof(char)*PATH_MAX,"%s",abspath);
 			}
 		}
 

=== modified file 'include/cfile.h'
--- include/cfile.h	2010-09-25 03:35:23 +0000
+++ include/cfile.h	2010-10-14 14:46:20 +0000
@@ -45,7 +45,7 @@
 {
 	char hogname2[PATH_MAX], pathname[PATH_MAX];
 
-	snprintf(hogname2, strlen(hogname)+1, hogname);
+	snprintf(hogname2, strlen(hogname)+1, "%s", hogname);
 	PHYSFSEXT_locateCorrectCase(hogname2);
 
 	if (!PHYSFSX_getRealPath(hogname2, pathname))
@@ -58,7 +58,7 @@
 {
 	char hogname2[PATH_MAX], pathname[PATH_MAX];
 
-	snprintf(hogname2, strlen(hogname)+1, hogname);
+	snprintf(hogname2, strlen(hogname)+1, "%s", hogname);
 	PHYSFSEXT_locateCorrectCase(hogname2);
 
 	if (!PHYSFSX_getRealPath(hogname2, pathname))
@@ -74,7 +74,7 @@
 	char hogname2[PATH_MAX];
 	int size;
 
-	snprintf(hogname2, strlen(hogname)+1, hogname);
+	snprintf(hogname2, strlen(hogname)+1, "%s", hogname);
 	PHYSFSEXT_locateCorrectCase(hogname2);
 
 	fp = PHYSFS_openRead(hogname2);

=== modified file 'main/console.c'
--- main/console.c	2010-02-08 14:28:12 +0000
+++ main/console.c	2010-10-14 14:46:20 +0000
@@ -82,7 +82,7 @@
 		con_add_buffer_line(priority, buffer);
 
 		/* Print output to stdout */
-		printf(buffer);
+		printf("%s",buffer);
 
 		/* Print output to gamelog.txt */
 		if (gamelog_fp)

=== modified file 'main/hud.c'
--- main/hud.c	2010-08-03 15:03:56 +0000
+++ main/hud.c	2010-10-14 14:46:20 +0000
@@ -154,7 +154,7 @@
 	{
 		HUD_nmessages++;
 	}
-	snprintf(HUD_messages[HUD_nmessages-1].message, sizeof(char)*HUD_MESSAGE_LENGTH, message);
+	snprintf(HUD_messages[HUD_nmessages-1].message, sizeof(char)*HUD_MESSAGE_LENGTH, "%s", message);
 	if (HUD_nmessages-HUD_MAX_NUM_DISP < 0)
 		HUD_messages[HUD_nmessages-1].time = F1_0*3; // one message - display 3 secs
 	else

=== modified file 'main/menu.c'
--- main/menu.c	2010-10-14 09:50:11 +0000
+++ main/menu.c	2010-10-14 14:46:20 +0000
@@ -1606,9 +1606,9 @@
 	char old_CMLevelMusicPath[PATH_MAX+1], old_CMMiscMusic0[PATH_MAX+1];
 
 	memset(old_CMLevelMusicPath, 0, sizeof(char)*(PATH_MAX+1));
-	snprintf(old_CMLevelMusicPath, strlen(GameCfg.CMLevelMusicPath)+1, GameCfg.CMLevelMusicPath);
+	snprintf(old_CMLevelMusicPath, strlen(GameCfg.CMLevelMusicPath)+1, "%s", GameCfg.CMLevelMusicPath);
 	memset(old_CMMiscMusic0, 0, sizeof(char)*(PATH_MAX+1));
-	snprintf(old_CMMiscMusic0, strlen(GameCfg.CMMiscMusic[SONG_TITLE])+1, GameCfg.CMMiscMusic[SONG_TITLE]);
+	snprintf(old_CMMiscMusic0, strlen(GameCfg.CMMiscMusic[SONG_TITLE])+1, "%s", GameCfg.CMMiscMusic[SONG_TITLE]);
 
 	MALLOC(m, newmenu_item, SOUND_MENU_NITEMS);
 	if (!m)

=== modified file 'main/mission.c'
--- main/mission.c	2010-08-24 14:02:38 +0000
+++ main/mission.c	2010-10-14 14:46:20 +0000
@@ -716,19 +716,19 @@
 				{
 					char *tmp, *ptr;
 					MALLOC(tmp, char, FILENAME_LEN);
-					snprintf(tmp, FILENAME_LEN, v);
+					snprintf(tmp, FILENAME_LEN, "%s", v);
 					if ((ptr = strrchr(tmp, '.'))) // if there's a filename extension, kill it. No one knows it's the right one.
 						*ptr = '\0';
 					strncat(tmp, ".tex", sizeof(char)*FILENAME_LEN); // apply tex-extenstion
 					if (cfexist(tmp)) // check if this file exists ...
-						snprintf(Briefing_text_filename, FILENAME_LEN, tmp); // ... and apply ...
+						snprintf(Briefing_text_filename, FILENAME_LEN, "%s", tmp); // ... and apply ...
 					else // ... otherwise ...
 					{
 						if ((ptr = strrchr(tmp, '.')))
 							*ptr = '\0';
 						strncat(tmp, ".txb", sizeof(char)*FILENAME_LEN); // apply txb extension
 						if (cfexist(tmp)) // check if this file exists ...
-							snprintf(Briefing_text_filename, FILENAME_LEN, tmp); // ... and apply ...
+							snprintf(Briefing_text_filename, FILENAME_LEN, "%s", tmp); // ... and apply ...
 					}
 					d_free(tmp);
 				}
@@ -741,19 +741,19 @@
 				{
 					char *tmp, *ptr;
 					MALLOC(tmp, char, FILENAME_LEN);
-					snprintf(tmp, FILENAME_LEN, v);
+					snprintf(tmp, FILENAME_LEN, "%s", v);
 					if ((ptr = strrchr(tmp, '.'))) // if there's a filename extension, kill it. No one knows it's the right one.
 						*ptr = '\0';
 					strncat(tmp, ".tex", sizeof(char)*FILENAME_LEN); // apply tex-extenstion
 					if (cfexist(tmp)) // check if this file exists ...
-						snprintf(Briefing_text_filename, FILENAME_LEN, tmp); // ... and apply ...
+						snprintf(Briefing_text_filename, FILENAME_LEN, "%s", tmp); // ... and apply ...
 					else // ... otherwise ...
 					{
 						if ((ptr = strrchr(tmp, '.')))
 							*ptr = '\0';
 						strncat(tmp, ".txb", sizeof(char)*FILENAME_LEN); // apply txb extension
 						if (cfexist(tmp)) // check if this file exists ...
-							snprintf(Ending_text_filename, FILENAME_LEN, tmp); // ... and apply ...
+							snprintf(Ending_text_filename, FILENAME_LEN, "%s", tmp); // ... and apply ...
 					}
 					d_free(tmp);
 				}

=== modified file 'main/net_ipx.c'
--- main/net_ipx.c	2010-09-01 17:01:51 +0000
+++ main/net_ipx.c	2010-10-14 14:46:20 +0000
@@ -5824,7 +5824,7 @@
 	if(!netgame->mission_title)
 		info+=sprintf(info,"Descent2: CounterStrike");
 	else
-		info+=sprintf(info,netgame->mission_title);
+		info+=sprintf(info,"%s",netgame->mission_title);
 
 	info+=sprintf (info," - Lvl %i",netgame->levelnum);
 	info+=sprintf (info,"\n\nDifficulty: %s",MENU_DIFFICULTY_TEXT(netgame->difficulty));

=== modified file 'main/net_udp.c'
--- main/net_udp.c	2010-09-01 17:01:51 +0000
+++ main/net_udp.c	2010-10-14 14:46:20 +0000
@@ -5183,7 +5183,7 @@
 	if(!netgame->mission_title)
 		info+=sprintf(info,"Descent2: CounterStrike");
 	else
-		info+=sprintf(info,netgame->mission_title);
+		info+=sprintf(info,"%s",netgame->mission_title);
 
 	info+=sprintf (info," - Lvl %i",netgame->levelnum);
 	info+=sprintf (info,"\n\nDifficulty: %s",MENU_DIFFICULTY_TEXT(netgame->difficulty));

=== modified file 'main/scores.c'
--- main/scores.c	2010-07-31 12:09:38 +0000
+++ main/scores.c	2010-10-14 14:46:20 +0000
@@ -91,7 +91,7 @@
 		int i;
 
 	 	// No error message needed, code will work without a scores file
-		sprintf( scores->cool_saying, COOL_SAYING );
+		sprintf( scores->cool_saying, "%s", COOL_SAYING );
 		sprintf( scores->stats[0].name, "Parallax" );
 		sprintf( scores->stats[1].name, "Matt" );
 		sprintf( scores->stats[2].name, "Mike" );

=== modified file 'misc/physfsx.c'
--- misc/physfsx.c	2010-09-25 13:55:22 +0000
+++ misc/physfsx.c	2010-10-14 14:46:20 +0000
@@ -304,7 +304,7 @@
 		filename++;
 	}
 	
-	snprintf(filename2, strlen(filename)+1, filename);
+	snprintf(filename2, strlen(filename)+1, "%s", filename);
 	PHYSFSEXT_locateCorrectCase(filename2);
 	
 	fp = PHYSFS_openRead(filename2);