From: <the...@us...> - 2006-12-13 11:10:34
|
Revision: 17985 http://svn.sourceforge.net/gaim/?rev=17985&view=rev Author: thekingant Date: 2006-12-13 03:10:32 -0800 (Wed, 13 Dec 2006) Log Message: ----------- 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. Modified Paths: -------------- trunk/console/libgnt/gntwm.c trunk/gtk/win32/win_gaim.c trunk/libgaim/protocols/qq/qq_proxy.c Modified: trunk/console/libgnt/gntwm.c =================================================================== --- trunk/console/libgnt/gntwm.c 2006-12-13 10:46:44 UTC (rev 17984) +++ trunk/console/libgnt/gntwm.c 2006-12-13 11:10:32 UTC (rev 17985) @@ -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) Modified: trunk/gtk/win32/win_gaim.c =================================================================== --- trunk/gtk/win32/win_gaim.c 2006-12-13 10:46:44 UTC (rev 17984) +++ trunk/gtk/win32/win_gaim.c 2006-12-13 11:10:32 UTC (rev 17985) @@ -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; Modified: trunk/libgaim/protocols/qq/qq_proxy.c =================================================================== --- trunk/libgaim/protocols/qq/qq_proxy.c 2006-12-13 10:46:44 UTC (rev 17984) +++ trunk/libgaim/protocols/qq/qq_proxy.c 2006-12-13 11:10:32 UTC (rev 17985) @@ -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 */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |