diff options
-rw-r--r-- | ChangeLog.txt | 12 | ||||
-rw-r--r-- | linden/indra/linux_crash_logger/llcrashloggerlinux.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindowsdl.cpp | 2 | ||||
-rw-r--r-- | linden/indra/lscript/lscript_compile/lscript_tree.cpp | 8 |
4 files changed, 18 insertions, 6 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index 88829c9..2e4f19b 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -1,3 +1,15 @@ | |||
1 | 2008-11-30 Jacek Antonelli <jacek.antonelli@gmail.com> | ||
2 | |||
3 | * linden/indra/llwindow/llwindowsdl.cpp: | ||
4 | Fixed passing nonliteral strings to *printf functions. | ||
5 | gcc 4.3 rejects that as being unsafe. | ||
6 | Patch by Stephen Zenith. [#11] | ||
7 | * linden/indra/linux_crash_logger/llcrashloggerlinux.cpp: | ||
8 | Ditto. | ||
9 | * linden/indra/lscript/lscript_compile/lscript_tree.cpp: | ||
10 | Ditto. | ||
11 | |||
12 | |||
1 | 2008-11-29 Jacek Antonelli <jacek.antonelli@gmail.com> | 13 | 2008-11-29 Jacek Antonelli <jacek.antonelli@gmail.com> |
2 | 14 | ||
3 | * linden/indra/newview/llpanellogin.cpp: | 15 | * linden/indra/newview/llpanellogin.cpp: |
diff --git a/linden/indra/linux_crash_logger/llcrashloggerlinux.cpp b/linden/indra/linux_crash_logger/llcrashloggerlinux.cpp index 6ac9831..c4294d6 100644 --- a/linden/indra/linux_crash_logger/llcrashloggerlinux.cpp +++ b/linden/indra/linux_crash_logger/llcrashloggerlinux.cpp | |||
@@ -90,7 +90,7 @@ static BOOL do_ask_dialog(void) | |||
90 | 90 | ||
91 | win = gtk_message_dialog_new(NULL, | 91 | win = gtk_message_dialog_new(NULL, |
92 | flags, messagetype, buttons, | 92 | flags, messagetype, buttons, |
93 | dialog_text); | 93 | "%s", dialog_text); |
94 | gtk_window_set_type_hint(GTK_WINDOW(win), | 94 | gtk_window_set_type_hint(GTK_WINDOW(win), |
95 | GDK_WINDOW_TYPE_HINT_DIALOG); | 95 | GDK_WINDOW_TYPE_HINT_DIALOG); |
96 | gtk_window_set_title(GTK_WINDOW(win), dialog_title); | 96 | gtk_window_set_title(GTK_WINDOW(win), dialog_title); |
diff --git a/linden/indra/llwindow/llwindowsdl.cpp b/linden/indra/llwindow/llwindowsdl.cpp index c088dd8..f0acee5 100644 --- a/linden/indra/llwindow/llwindowsdl.cpp +++ b/linden/indra/llwindow/llwindowsdl.cpp | |||
@@ -2530,7 +2530,7 @@ S32 OSMessageBoxSDL(const std::string& text, const std::string& caption, U32 typ | |||
2530 | buttons = GTK_BUTTONS_YES_NO; | 2530 | buttons = GTK_BUTTONS_YES_NO; |
2531 | break; | 2531 | break; |
2532 | } | 2532 | } |
2533 | win = gtk_message_dialog_new(NULL,flags, messagetype, buttons, text.c_str()); | 2533 | win = gtk_message_dialog_new(NULL,flags, messagetype, buttons, "%s", text.c_str()); |
2534 | 2534 | ||
2535 | # if LL_X11 | 2535 | # if LL_X11 |
2536 | // Make GTK tell the window manager to associate this | 2536 | // Make GTK tell the window manager to associate this |
diff --git a/linden/indra/lscript/lscript_compile/lscript_tree.cpp b/linden/indra/lscript/lscript_compile/lscript_tree.cpp index 71e7f19..70d8195 100644 --- a/linden/indra/lscript/lscript_compile/lscript_tree.cpp +++ b/linden/indra/lscript/lscript_compile/lscript_tree.cpp | |||
@@ -7885,10 +7885,10 @@ void LLScriptFunctionCall::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom | |||
7885 | { | 7885 | { |
7886 | // Prefix function name with g to distinguish from | 7886 | // Prefix function name with g to distinguish from |
7887 | // event handlers. | 7887 | // event handlers. |
7888 | fprintf(fp, gScriptp->getClassName()); | 7888 | fprintf(fp, "%s", gScriptp->getClassName()); |
7889 | fprintf(fp, "::'g"); | 7889 | fprintf(fp, "::'g"); |
7890 | } | 7890 | } |
7891 | fprintf(fp, mIdentifier->mName); | 7891 | fprintf(fp, "%s", mIdentifier->mName); |
7892 | fprintf(fp, "'("); | 7892 | fprintf(fp, "'("); |
7893 | print_cil_arg_list(fp, mIdentifier->mScopeEntry->mFunctionArgs); | 7893 | print_cil_arg_list(fp, mIdentifier->mScopeEntry->mFunctionArgs); |
7894 | fprintf(fp, ")\n"); | 7894 | fprintf(fp, ")\n"); |
@@ -9720,7 +9720,7 @@ void LLScriptEventHandler::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom | |||
9720 | // Allows state changing by finding handlers prefixed with new | 9720 | // Allows state changing by finding handlers prefixed with new |
9721 | // state name. Prefix disambiguates functions and event handlers. | 9721 | // state name. Prefix disambiguates functions and event handlers. |
9722 | fprintf(fp, "e"); | 9722 | fprintf(fp, "e"); |
9723 | fprintf(fp, entry->mIdentifier); | 9723 | fprintf(fp, "%s", entry->mIdentifier); |
9724 | 9724 | ||
9725 | // Handler name and arguments. | 9725 | // Handler name and arguments. |
9726 | mEventp->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL); | 9726 | mEventp->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL); |
@@ -10152,7 +10152,7 @@ void LLScriptGlobalFunctions::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPT | |||
10152 | fprintf(fp, ".method public hidebysig instance default "); | 10152 | fprintf(fp, ".method public hidebysig instance default "); |
10153 | print_cil_type(fp, mType ? mType->mType : LST_NULL); | 10153 | print_cil_type(fp, mType ? mType->mType : LST_NULL); |
10154 | fprintf(fp, " 'g"); | 10154 | fprintf(fp, " 'g"); |
10155 | fprintf(fp, mIdentifier->mName); | 10155 | fprintf(fp, "%s", mIdentifier->mName); |
10156 | fprintf(fp, "'"); | 10156 | fprintf(fp, "'"); |
10157 | if (mParameters) | 10157 | if (mParameters) |
10158 | { | 10158 | { |