Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 167341
Collapse All | Expand All

(-)arch/sdl/jukebox.c (-1 / +1 lines)
Lines 164-170 Link Here
164
			if (PHYSFS_isDirectory(GameCfg.CMLevelMusicPath)) // it's a child of Sharepath, build full path
164
			if (PHYSFS_isDirectory(GameCfg.CMLevelMusicPath)) // it's a child of Sharepath, build full path
165
			{
165
			{
166
				PHYSFSX_getRealPath(GameCfg.CMLevelMusicPath,abspath);
166
				PHYSFSX_getRealPath(GameCfg.CMLevelMusicPath,abspath);
167
				snprintf(GameCfg.CMLevelMusicPath,sizeof(char)*PATH_MAX,abspath);
167
				snprintf(GameCfg.CMLevelMusicPath,sizeof(char)*PATH_MAX,"%s",abspath);
168
			}
168
			}
169
		}
169
		}
170
170
(-)include/cfile.h (-3 / +3 lines)
Lines 45-51 Link Here
45
{
45
{
46
	char hogname2[PATH_MAX], pathname[PATH_MAX];
46
	char hogname2[PATH_MAX], pathname[PATH_MAX];
47
47
48
	snprintf(hogname2, strlen(hogname)+1, hogname);
48
	snprintf(hogname2, strlen(hogname)+1, "%s", hogname);
49
	PHYSFSEXT_locateCorrectCase(hogname2);
49
	PHYSFSEXT_locateCorrectCase(hogname2);
50
50
51
	if (!PHYSFSX_getRealPath(hogname2, pathname))
51
	if (!PHYSFSX_getRealPath(hogname2, pathname))
Lines 58-64 Link Here
58
{
58
{
59
	char hogname2[PATH_MAX], pathname[PATH_MAX];
59
	char hogname2[PATH_MAX], pathname[PATH_MAX];
60
60
61
	snprintf(hogname2, strlen(hogname)+1, hogname);
61
	snprintf(hogname2, strlen(hogname)+1, "%s", hogname);
62
	PHYSFSEXT_locateCorrectCase(hogname2);
62
	PHYSFSEXT_locateCorrectCase(hogname2);
63
63
64
	if (!PHYSFSX_getRealPath(hogname2, pathname))
64
	if (!PHYSFSX_getRealPath(hogname2, pathname))
Lines 74-80 Link Here
74
	char hogname2[PATH_MAX];
74
	char hogname2[PATH_MAX];
75
	int size;
75
	int size;
76
76
77
	snprintf(hogname2, strlen(hogname)+1, hogname);
77
	snprintf(hogname2, strlen(hogname)+1, "%s", hogname);
78
	PHYSFSEXT_locateCorrectCase(hogname2);
78
	PHYSFSEXT_locateCorrectCase(hogname2);
79
79
80
	fp = PHYSFS_openRead(hogname2);
80
	fp = PHYSFS_openRead(hogname2);
(-)main/console.c (-1 / +1 lines)
Lines 82-88 Link Here
82
		con_add_buffer_line(priority, buffer);
82
		con_add_buffer_line(priority, buffer);
83
83
84
		/* Print output to stdout */
84
		/* Print output to stdout */
85
		printf(buffer);
85
		printf("%s",buffer);
86
86
87
		/* Print output to gamelog.txt */
87
		/* Print output to gamelog.txt */
88
		if (gamelog_fp)
88
		if (gamelog_fp)
(-)main/hud.c (-1 / +1 lines)
Lines 154-160 Link Here
154
	{
154
	{
155
		HUD_nmessages++;
155
		HUD_nmessages++;
156
	}
156
	}
157
	snprintf(HUD_messages[HUD_nmessages-1].message, sizeof(char)*HUD_MESSAGE_LENGTH, message);
157
	snprintf(HUD_messages[HUD_nmessages-1].message, sizeof(char)*HUD_MESSAGE_LENGTH, "%s", message);
158
	if (HUD_nmessages-HUD_MAX_NUM_DISP < 0)
158
	if (HUD_nmessages-HUD_MAX_NUM_DISP < 0)
159
		HUD_messages[HUD_nmessages-1].time = F1_0*3; // one message - display 3 secs
159
		HUD_messages[HUD_nmessages-1].time = F1_0*3; // one message - display 3 secs
160
	else
160
	else
(-)main/menu.c (-2 / +2 lines)
Lines 1606-1614 Link Here
1606
	char old_CMLevelMusicPath[PATH_MAX+1], old_CMMiscMusic0[PATH_MAX+1];
1606
	char old_CMLevelMusicPath[PATH_MAX+1], old_CMMiscMusic0[PATH_MAX+1];
1607
1607
1608
	memset(old_CMLevelMusicPath, 0, sizeof(char)*(PATH_MAX+1));
1608
	memset(old_CMLevelMusicPath, 0, sizeof(char)*(PATH_MAX+1));
1609
	snprintf(old_CMLevelMusicPath, strlen(GameCfg.CMLevelMusicPath)+1, GameCfg.CMLevelMusicPath);
1609
	snprintf(old_CMLevelMusicPath, strlen(GameCfg.CMLevelMusicPath)+1, "%s", GameCfg.CMLevelMusicPath);
1610
	memset(old_CMMiscMusic0, 0, sizeof(char)*(PATH_MAX+1));
1610
	memset(old_CMMiscMusic0, 0, sizeof(char)*(PATH_MAX+1));
1611
	snprintf(old_CMMiscMusic0, strlen(GameCfg.CMMiscMusic[SONG_TITLE])+1, GameCfg.CMMiscMusic[SONG_TITLE]);
1611
	snprintf(old_CMMiscMusic0, strlen(GameCfg.CMMiscMusic[SONG_TITLE])+1, "%s", GameCfg.CMMiscMusic[SONG_TITLE]);
1612
1612
1613
	MALLOC(m, newmenu_item, SOUND_MENU_NITEMS);
1613
	MALLOC(m, newmenu_item, SOUND_MENU_NITEMS);
1614
	if (!m)
1614
	if (!m)
(-)main/mission.c (-6 / +6 lines)
Lines 716-734 Link Here
716
				{
716
				{
717
					char *tmp, *ptr;
717
					char *tmp, *ptr;
718
					MALLOC(tmp, char, FILENAME_LEN);
718
					MALLOC(tmp, char, FILENAME_LEN);
719
					snprintf(tmp, FILENAME_LEN, v);
719
					snprintf(tmp, FILENAME_LEN, "%s", v);
720
					if ((ptr = strrchr(tmp, '.'))) // if there's a filename extension, kill it. No one knows it's the right one.
720
					if ((ptr = strrchr(tmp, '.'))) // if there's a filename extension, kill it. No one knows it's the right one.
721
						*ptr = '\0';
721
						*ptr = '\0';
722
					strncat(tmp, ".tex", sizeof(char)*FILENAME_LEN); // apply tex-extenstion
722
					strncat(tmp, ".tex", sizeof(char)*FILENAME_LEN); // apply tex-extenstion
723
					if (cfexist(tmp)) // check if this file exists ...
723
					if (cfexist(tmp)) // check if this file exists ...
724
						snprintf(Briefing_text_filename, FILENAME_LEN, tmp); // ... and apply ...
724
						snprintf(Briefing_text_filename, FILENAME_LEN, "%s", tmp); // ... and apply ...
725
					else // ... otherwise ...
725
					else // ... otherwise ...
726
					{
726
					{
727
						if ((ptr = strrchr(tmp, '.')))
727
						if ((ptr = strrchr(tmp, '.')))
728
							*ptr = '\0';
728
							*ptr = '\0';
729
						strncat(tmp, ".txb", sizeof(char)*FILENAME_LEN); // apply txb extension
729
						strncat(tmp, ".txb", sizeof(char)*FILENAME_LEN); // apply txb extension
730
						if (cfexist(tmp)) // check if this file exists ...
730
						if (cfexist(tmp)) // check if this file exists ...
731
							snprintf(Briefing_text_filename, FILENAME_LEN, tmp); // ... and apply ...
731
							snprintf(Briefing_text_filename, FILENAME_LEN, "%s", tmp); // ... and apply ...
732
					}
732
					}
733
					d_free(tmp);
733
					d_free(tmp);
734
				}
734
				}
Lines 741-759 Link Here
741
				{
741
				{
742
					char *tmp, *ptr;
742
					char *tmp, *ptr;
743
					MALLOC(tmp, char, FILENAME_LEN);
743
					MALLOC(tmp, char, FILENAME_LEN);
744
					snprintf(tmp, FILENAME_LEN, v);
744
					snprintf(tmp, FILENAME_LEN, "%s", v);
745
					if ((ptr = strrchr(tmp, '.'))) // if there's a filename extension, kill it. No one knows it's the right one.
745
					if ((ptr = strrchr(tmp, '.'))) // if there's a filename extension, kill it. No one knows it's the right one.
746
						*ptr = '\0';
746
						*ptr = '\0';
747
					strncat(tmp, ".tex", sizeof(char)*FILENAME_LEN); // apply tex-extenstion
747
					strncat(tmp, ".tex", sizeof(char)*FILENAME_LEN); // apply tex-extenstion
748
					if (cfexist(tmp)) // check if this file exists ...
748
					if (cfexist(tmp)) // check if this file exists ...
749
						snprintf(Briefing_text_filename, FILENAME_LEN, tmp); // ... and apply ...
749
						snprintf(Briefing_text_filename, FILENAME_LEN, "%s", tmp); // ... and apply ...
750
					else // ... otherwise ...
750
					else // ... otherwise ...
751
					{
751
					{
752
						if ((ptr = strrchr(tmp, '.')))
752
						if ((ptr = strrchr(tmp, '.')))
753
							*ptr = '\0';
753
							*ptr = '\0';
754
						strncat(tmp, ".txb", sizeof(char)*FILENAME_LEN); // apply txb extension
754
						strncat(tmp, ".txb", sizeof(char)*FILENAME_LEN); // apply txb extension
755
						if (cfexist(tmp)) // check if this file exists ...
755
						if (cfexist(tmp)) // check if this file exists ...
756
							snprintf(Ending_text_filename, FILENAME_LEN, tmp); // ... and apply ...
756
							snprintf(Ending_text_filename, FILENAME_LEN, "%s", tmp); // ... and apply ...
757
					}
757
					}
758
					d_free(tmp);
758
					d_free(tmp);
759
				}
759
				}
(-)main/net_ipx.c (-1 / +1 lines)
Lines 5824-5830 Link Here
5824
	if(!netgame->mission_title)
5824
	if(!netgame->mission_title)
5825
		info+=sprintf(info,"Descent2: CounterStrike");
5825
		info+=sprintf(info,"Descent2: CounterStrike");
5826
	else
5826
	else
5827
		info+=sprintf(info,netgame->mission_title);
5827
		info+=sprintf(info,"%s",netgame->mission_title);
5828
5828
5829
	info+=sprintf (info," - Lvl %i",netgame->levelnum);
5829
	info+=sprintf (info," - Lvl %i",netgame->levelnum);
5830
	info+=sprintf (info,"\n\nDifficulty: %s",MENU_DIFFICULTY_TEXT(netgame->difficulty));
5830
	info+=sprintf (info,"\n\nDifficulty: %s",MENU_DIFFICULTY_TEXT(netgame->difficulty));
(-)main/net_udp.c (-1 / +1 lines)
Lines 5183-5189 Link Here
5183
	if(!netgame->mission_title)
5183
	if(!netgame->mission_title)
5184
		info+=sprintf(info,"Descent2: CounterStrike");
5184
		info+=sprintf(info,"Descent2: CounterStrike");
5185
	else
5185
	else
5186
		info+=sprintf(info,netgame->mission_title);
5186
		info+=sprintf(info,"%s",netgame->mission_title);
5187
5187
5188
	info+=sprintf (info," - Lvl %i",netgame->levelnum);
5188
	info+=sprintf (info," - Lvl %i",netgame->levelnum);
5189
	info+=sprintf (info,"\n\nDifficulty: %s",MENU_DIFFICULTY_TEXT(netgame->difficulty));
5189
	info+=sprintf (info,"\n\nDifficulty: %s",MENU_DIFFICULTY_TEXT(netgame->difficulty));
(-)main/scores.c (-1 / +1 lines)
Lines 91-97 Link Here
91
		int i;
91
		int i;
92
92
93
	 	// No error message needed, code will work without a scores file
93
	 	// No error message needed, code will work without a scores file
94
		sprintf( scores->cool_saying, COOL_SAYING );
94
		sprintf( scores->cool_saying, "%s", COOL_SAYING );
95
		sprintf( scores->stats[0].name, "Parallax" );
95
		sprintf( scores->stats[0].name, "Parallax" );
96
		sprintf( scores->stats[1].name, "Matt" );
96
		sprintf( scores->stats[1].name, "Matt" );
97
		sprintf( scores->stats[2].name, "Mike" );
97
		sprintf( scores->stats[2].name, "Mike" );
(-)misc/physfsx.c (-1 / +1 lines)
Lines 304-310 Link Here
304
		filename++;
304
		filename++;
305
	}
305
	}
306
	
306
	
307
	snprintf(filename2, strlen(filename)+1, filename);
307
	snprintf(filename2, strlen(filename)+1, "%s", filename);
308
	PHYSFSEXT_locateCorrectCase(filename2);
308
	PHYSFSEXT_locateCorrectCase(filename2);
309
	
309
	
310
	fp = PHYSFS_openRead(filename2);
310
	fp = PHYSFS_openRead(filename2);

Return to bug 167341