diff --git a/lib/diagnostics_win.cpp b/lib/diagnostics_win.cpp index 7b6f2fdd6f..38fc15d34b 100644 --- a/lib/diagnostics_win.cpp +++ b/lib/diagnostics_win.cpp @@ -1552,6 +1552,7 @@ UINT WINAPI diagnostics_unhandled_exception_monitor(LPVOID /* lpParameter */) { CONTEXT c; BOINC_WINDOWCAPTURE window_info; BOINC_THREADLISTENTRY *pThreadEntry = NULL; + const size_t boinc_install_dir_len = strlen(diagnostics_get_boinc_install_dir()); // We should not suspend our crash dump thread. diagnostics_set_thread_exempt_suspend(); @@ -1614,7 +1615,7 @@ UINT WINAPI diagnostics_unhandled_exception_monitor(LPVOID /* lpParameter */) { // Kickstart the debugger extensions, look for the debugger files // in the install directory if it is defined, otherwise look // in the data directory. - if (0 != strlen(diagnostics_get_boinc_install_dir())) { + if (0 != boinc_install_dir_len) { bDebuggerInitialized = !DebuggerInitialize( diagnostics_get_boinc_install_dir(), diagnostics_get_symstore(), diff --git a/lib/parse.cpp b/lib/parse.cpp index abb05d59a5..a825f62d5f 100644 --- a/lib/parse.cpp +++ b/lib/parse.cpp @@ -321,6 +321,7 @@ void extract_venue(const char* in, const char* venue_name, char* out, int len) { const char* p, *q; char* wp; char buf[256]; + const size_t venue_close_tag_len = strlen(""); snprintf(buf, sizeof(buf), "", venue_name); p = strstr(in, buf); if (p) { @@ -344,7 +345,7 @@ void extract_venue(const char* in, const char* venue_name, char* out, int len) { strncat(out, q, p-q); q = strstr(p, ""); if (!q) break; - q += strlen(""); + q += venue_close_tag_len; } } }