changeset 15197:92ebda7a7afc

[gaim-migrate @ 17985] Jonathan Brossard (endrazine) found some more places where we were passing normal strings to printf as format strings, which could cause problems when printing text containing the % character. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 13 Dec 2006 11:10:32 +0000
parents ee79c2c1b5ac
children 933ae49622e7
files console/libgnt/gntwm.c gtk/win32/win_gaim.c libgaim/protocols/qq/qq_proxy.c
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/console/libgnt/gntwm.c	Wed Dec 13 10:46:44 2006 +0000
+++ b/console/libgnt/gntwm.c	Wed Dec 13 11:10:32 2006 +0000
@@ -431,11 +431,11 @@
 				if (now & attr)  \
 				{  \
 					if (!(old & attr))  \
-						fprintf(file, start);  \
+						fprintf(file, "%s", start);  \
 				}  \
 				else if (old & attr)  \
 				{  \
-					fprintf(file, end);  \
+					fprintf(file, "%s", end);  \
 				}  \
 			} while (0) 
 
--- a/gtk/win32/win_gaim.c	Wed Dec 13 10:46:44 2006 +0000
+++ b/gtk/win32/win_gaim.c	Wed Dec 13 11:10:32 2006 +0000
@@ -145,7 +145,7 @@
 		putenv(settingsdir);
 
 		snprintf(aspelldir, sizeof(aspelldir), "GAIM_ASPELL_DIR=%s\\Aspell\\bin", path);
-		printf(aspelldir);
+		printf("%s", aspelldir);
 		putenv(aspelldir);
 
 		/* set the GTK+ path to be \\path\to\GTK\bin */
@@ -513,7 +513,7 @@
 		snprintf(errbuf, 512,
 			"Error getting module filename.\nError: (%u) %s",
 			(UINT) dw, err_msg);
-		printf(errbuf);
+		printf("%s", errbuf);
 		MessageBox(NULL, errbuf, NULL, MB_OK | MB_TOPMOST);
 	}
 
@@ -542,7 +542,7 @@
 			(UINT) dw, err_msg,
 			mod_not_found ? "\n" : "",
 			mod_not_found ? "This probably means that GTK+ can't be found." : "");
-		printf(errbuf);
+		printf("%s", errbuf);
 		MessageBox(NULL, errbuf, TEXT("Error"), MB_OK | MB_TOPMOST);
 
 		return 0;
--- a/libgaim/protocols/qq/qq_proxy.c	Wed Dec 13 10:46:44 2006 +0000
+++ b/libgaim/protocols/qq/qq_proxy.c	Wed Dec 13 11:10:32 2006 +0000
@@ -65,7 +65,7 @@
 		strcat(buf1, buf2);
 	}
 	strcat(buf1, "\n");
-	gaim_debug(GAIM_DEBUG_INFO, desc, buf1);
+	gaim_debug(GAIM_DEBUG_INFO, desc, "%s", buf1);
 }
 
 /* QQ 2003iii uses double MD5 for the pwkey to get the session key */