diff options
author | Jacek Antonelli | 2008-08-15 23:44:48 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:48 -0500 |
commit | 9b4f54c826ffa4f94efa866068c9d6ecdfb4b424 (patch) | |
tree | 2f8ae193ab487088962e628f1ee9dee2f5901f01 /linden/indra/linux_crash_logger | |
parent | Second Life viewer sources 1.13.2.12 (diff) | |
download | meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.zip meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.gz meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.bz2 meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.xz |
Second Life viewer sources 1.13.2.15
Diffstat (limited to 'linden/indra/linux_crash_logger')
-rw-r--r-- | linden/indra/linux_crash_logger/linux_crash_logger.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/linden/indra/linux_crash_logger/linux_crash_logger.cpp b/linden/indra/linux_crash_logger/linux_crash_logger.cpp index a332ccc..196ff6e 100644 --- a/linden/indra/linux_crash_logger/linux_crash_logger.cpp +++ b/linden/indra/linux_crash_logger/linux_crash_logger.cpp | |||
@@ -238,10 +238,8 @@ int main(int argc, char **argv) | |||
238 | db_filep = new LLFileEncoder("DB", db_file_name.c_str()); | 238 | db_filep = new LLFileEncoder("DB", db_file_name.c_str()); |
239 | 239 | ||
240 | // Get the filename of the SecondLife.log file | 240 | // Get the filename of the SecondLife.log file |
241 | // *TODO tofu - get right MAX_PATH. | 241 | // *NOTE: These buffer sizes are hardcoded into a scanf() below. |
242 | // *FIX: What's up with this? This #define just can't be safe. | 242 | char tmp_sl_name[LL_MAX_PATH]; |
243 | #define MAX_PATH PATH_MAX | ||
244 | char tmp_sl_name[MAX_PATH]; | ||
245 | tmp_sl_name[0] = '\0'; | 243 | tmp_sl_name[0] = '\0'; |
246 | char tmp_space[256]; | 244 | char tmp_space[256]; |
247 | tmp_space[0] = '\0'; | 245 | tmp_space[0] = '\0'; |
@@ -251,7 +249,7 @@ int main(int argc, char **argv) | |||
251 | { | 249 | { |
252 | // This was originally scanning for "SL Log: %[^\r\n]", which happily skipped to the next line | 250 | // This was originally scanning for "SL Log: %[^\r\n]", which happily skipped to the next line |
253 | // on debug logs (which don't have anything after "SL Log:" and tried to open a nonsensical filename. | 251 | // on debug logs (which don't have anything after "SL Log:" and tried to open a nonsensical filename. |
254 | sscanf(db_filep->mBuf.c_str(), "SL Log:%[ ]%[^\r\n]", tmp_space, tmp_sl_name); | 252 | sscanf(db_filep->mBuf.c_str(), "SL Log:%255[ ]%1023[^\r\n]", tmp_space, tmp_sl_name); |
255 | } | 253 | } |
256 | else | 254 | else |
257 | { | 255 | { |