diff options
Diffstat (limited to 'linden/indra/win_crash_logger/win_crash_logger.cpp')
-rw-r--r-- | linden/indra/win_crash_logger/win_crash_logger.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/linden/indra/win_crash_logger/win_crash_logger.cpp b/linden/indra/win_crash_logger/win_crash_logger.cpp index effe56c..5849438 100644 --- a/linden/indra/win_crash_logger/win_crash_logger.cpp +++ b/linden/indra/win_crash_logger/win_crash_logger.cpp | |||
@@ -69,8 +69,8 @@ void write_debug(std::string& str); | |||
69 | 69 | ||
70 | // Global Variables: | 70 | // Global Variables: |
71 | HINSTANCE hInst= NULL; // current instance | 71 | HINSTANCE hInst= NULL; // current instance |
72 | TCHAR szTitle[MAX_LOADSTRING]; // The title bar text | 72 | TCHAR szTitle[MAX_LOADSTRING]; /* Flawfinder: ignore */ // The title bar text |
73 | TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text | 73 | TCHAR szWindowClass[MAX_LOADSTRING]; /* Flawfinder: ignore */ // The title bar text |
74 | 74 | ||
75 | LLString gUserText; // User's description of the problem | 75 | LLString gUserText; // User's description of the problem |
76 | time_t gStartTime = 0; | 76 | time_t gStartTime = 0; |
@@ -91,10 +91,10 @@ WCHAR gProductName[512]; | |||
91 | // Include product name in the window caption. | 91 | // Include product name in the window caption. |
92 | void ProcessCaption(HWND hWnd) | 92 | void ProcessCaption(HWND hWnd) |
93 | { | 93 | { |
94 | TCHAR templateText[1024]; | 94 | TCHAR templateText[1024]; /* Flawfinder: ignore */ |
95 | TCHAR finalText[2048]; | 95 | TCHAR finalText[2048]; /* Flawfinder: ignore */ |
96 | GetWindowText(hWnd, templateText, sizeof(templateText)); | 96 | GetWindowText(hWnd, templateText, sizeof(templateText)); |
97 | swprintf(finalText, templateText, gProductName); | 97 | swprintf(finalText, templateText, gProductName); /* Flawfinder: ignore */ |
98 | SetWindowText(hWnd, finalText); | 98 | SetWindowText(hWnd, finalText); |
99 | } | 99 | } |
100 | 100 | ||
@@ -102,10 +102,10 @@ void ProcessCaption(HWND hWnd) | |||
102 | // Include product name in the diaog item text. | 102 | // Include product name in the diaog item text. |
103 | void ProcessDlgItemText(HWND hWnd, int nIDDlgItem) | 103 | void ProcessDlgItemText(HWND hWnd, int nIDDlgItem) |
104 | { | 104 | { |
105 | TCHAR templateText[1024]; | 105 | TCHAR templateText[1024]; /* Flawfinder: ignore */ |
106 | TCHAR finalText[2048]; | 106 | TCHAR finalText[2048]; /* Flawfinder: ignore */ |
107 | GetDlgItemText(hWnd, nIDDlgItem, templateText, sizeof(templateText)); | 107 | GetDlgItemText(hWnd, nIDDlgItem, templateText, sizeof(templateText)); |
108 | swprintf(finalText, templateText, gProductName); | 108 | swprintf(finalText, templateText, gProductName); /* Flawfinder: ignore */ |
109 | SetDlgItemText(hWnd, nIDDlgItem, finalText); | 109 | SetDlgItemText(hWnd, nIDDlgItem, finalText); |
110 | } | 110 | } |
111 | 111 | ||
@@ -119,7 +119,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, | |||
119 | gDirUtilp->initAppDirs("SecondLife"); | 119 | gDirUtilp->initAppDirs("SecondLife"); |
120 | 120 | ||
121 | // Default to the product name "Second Life" (this is overridden by the -name argument) | 121 | // Default to the product name "Second Life" (this is overridden by the -name argument) |
122 | swprintf(gProductName, L"Second Life"); | 122 | swprintf(gProductName, L"Second Life"); /* Flawfinder: ignore */ |
123 | 123 | ||
124 | gCrashSettings.declareS32(CRASH_BEHAVIOR_SETTING, CRASH_BEHAVIOR_ASK, "Controls behavior when viewer crashes " | 124 | gCrashSettings.declareS32(CRASH_BEHAVIOR_SETTING, CRASH_BEHAVIOR_ASK, "Controls behavior when viewer crashes " |
125 | "(0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report)"); | 125 | "(0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report)"); |
@@ -138,7 +138,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, | |||
138 | 138 | ||
139 | const S32 MAX_ARGS = 100; | 139 | const S32 MAX_ARGS = 100; |
140 | int argc = 0; | 140 | int argc = 0; |
141 | char *argv[MAX_ARGS]; | 141 | char *argv[MAX_ARGS]; /* Flawfinder: ignore */ |
142 | 142 | ||
143 | char *token = NULL; | 143 | char *token = NULL; |
144 | if( cmd_line_including_exe_name[0] == '\"' ) | 144 | if( cmd_line_including_exe_name[0] == '\"' ) |
@@ -158,7 +158,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, | |||
158 | { | 158 | { |
159 | argv[argc++] = token; | 159 | argv[argc++] = token; |
160 | /* Get next token: */ | 160 | /* Get next token: */ |
161 | if (*(token + strlen(token) + 1) == '\"') | 161 | if (*(token + strlen(token) + 1) == '\"') /* Flawfinder: ignore */ |
162 | { | 162 | { |
163 | token = strtok( NULL, "\""); | 163 | token = strtok( NULL, "\""); |
164 | } | 164 | } |
@@ -269,11 +269,11 @@ int APIENTRY WinMain(HINSTANCE hInstance, | |||
269 | WCHAR header[2048]; | 269 | WCHAR header[2048]; |
270 | if (gCrashInPreviousExec) | 270 | if (gCrashInPreviousExec) |
271 | { | 271 | { |
272 | swprintf(header, L"%s appears to have crashed or frozen the last time it ran.", gProductName); | 272 | swprintf(header, L"%s appears to have crashed or frozen the last time it ran.", gProductName); /* Flawfinder: ignore */ |
273 | } | 273 | } |
274 | else | 274 | else |
275 | { | 275 | { |
276 | swprintf(header, L"%s appears to have crashed.", gProductName); | 276 | swprintf(header, L"%s appears to have crashed.", gProductName); /* Flawfinder: ignore */ |
277 | } | 277 | } |
278 | SetDlgItemText(gHwndReport, IDC_STATIC_HEADER, header); | 278 | SetDlgItemText(gHwndReport, IDC_STATIC_HEADER, header); |
279 | ShowWindow(gHwndReport, SW_SHOW ); | 279 | ShowWindow(gHwndReport, SW_SHOW ); |
@@ -497,7 +497,7 @@ void send_crash_report() | |||
497 | 497 | ||
498 | // Get the filename of the SecondLife.log file | 498 | // Get the filename of the SecondLife.log file |
499 | // *NOTE: This buffer size is hard coded into scanf() below. | 499 | // *NOTE: This buffer size is hard coded into scanf() below. |
500 | char tmp_sl_name[256]; | 500 | char tmp_sl_name[256]; /* Flawfinder: ignore */ |
501 | tmp_sl_name[0] = '\0'; | 501 | tmp_sl_name[0] = '\0'; |
502 | 502 | ||
503 | update_messages(); | 503 | update_messages(); |
@@ -701,7 +701,7 @@ void send_crash_report() | |||
701 | // Post data to web server | 701 | // Post data to web server |
702 | const S32 BUFSIZE = 65536; | 702 | const S32 BUFSIZE = 65536; |
703 | HINTERNET hinet, hsession, hrequest; | 703 | HINTERNET hinet, hsession, hrequest; |
704 | char data[BUFSIZE]; | 704 | char data[BUFSIZE]; /* Flawfinder: ignore */ |
705 | unsigned long bytes_read; | 705 | unsigned long bytes_read; |
706 | 706 | ||
707 | llinfos << "Connecting to crash report server" << llendl; | 707 | llinfos << "Connecting to crash report server" << llendl; |
@@ -809,7 +809,7 @@ LLFileEncoder::LLFileEncoder(const char *form_name, const char *filename) | |||
809 | while (count < 5) | 809 | while (count < 5) |
810 | { | 810 | { |
811 | buf_size = stat_data.st_size; | 811 | buf_size = stat_data.st_size; |
812 | fp = LLFile::fopen(mFilename.c_str(), "rb"); | 812 | fp = LLFile::fopen(mFilename.c_str(), "rb"); /* Flawfinder: ignore */ |
813 | if (!fp) | 813 | if (!fp) |
814 | { | 814 | { |
815 | llwarns << "Can't open file " << mFilename << ", wait for a second" << llendl; | 815 | llwarns << "Can't open file " << mFilename << ", wait for a second" << llendl; |
@@ -897,14 +897,14 @@ void write_debug(const char *str) | |||
897 | { | 897 | { |
898 | std::string debug_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"debug_info.log"); | 898 | std::string debug_filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"debug_info.log"); |
899 | llinfos << "Opening debug file " << debug_filename << llendl; | 899 | llinfos << "Opening debug file " << debug_filename << llendl; |
900 | gDebugFile = LLFile::fopen(debug_filename.c_str(), "a+"); | 900 | gDebugFile = LLFile::fopen(debug_filename.c_str(), "a+"); /* Flawfinder: ignore */ |
901 | if (!gDebugFile) | 901 | if (!gDebugFile) |
902 | { | 902 | { |
903 | fprintf(stderr, "Couldn't open %s: debug log to stderr instead.\n", debug_filename.c_str()); | 903 | fprintf(stderr, "Couldn't open %s: debug log to stderr instead.\n", debug_filename.c_str()); |
904 | gDebugFile = stderr; | 904 | gDebugFile = stderr; |
905 | } | 905 | } |
906 | } | 906 | } |
907 | fprintf(gDebugFile, str); | 907 | fprintf(gDebugFile, str); /* Flawfinder: ignore */ |
908 | fflush(gDebugFile); | 908 | fflush(gDebugFile); |
909 | } | 909 | } |
910 | 910 | ||