# HG changeset patch # User Mark Doliner # Date 1166008232 0 # Node ID 92ebda7a7afc86a2e7ce2cb198067e595888c9b4 # Parent ee79c2c1b5acad4bc8b590c5ce0cdb01b9534395 [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 diff -r ee79c2c1b5ac -r 92ebda7a7afc console/libgnt/gntwm.c --- 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) diff -r ee79c2c1b5ac -r 92ebda7a7afc gtk/win32/win_gaim.c --- 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; diff -r ee79c2c1b5ac -r 92ebda7a7afc libgaim/protocols/qq/qq_proxy.c --- 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 */