diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp
index bf7c7ddba2..3d21e7e55d 100644
--- a/indra/llplugin/llpluginprocessparent.cpp
+++ b/indra/llplugin/llpluginprocessparent.cpp
@@ -895,16 +895,24 @@ void LLPluginProcessParent::poll(F64 timeout)
{
// timed out with no incoming data. Just return.
}
- else if(status == EBADF)
+ // better logging of poll issues
+ // else if(status == EBADF)
+ else if(APR_STATUS_IS_EBADF(status))
{
// This happens when one of the file descriptors in the pollset is destroyed, which happens whenever a plugin's socket is closed.
// The pollset has been or will be recreated, so just return.
LL_DEBUGS("PluginPoll") << "apr_pollset_poll returned EBADF" << LL_ENDL;
}
- else if(status != APR_SUCCESS)
+ // better logging of poll issues
+ // else if(status != APR_SUCCESS)
+ // {
+ // LL_WARNS("PluginPoll") << "apr_pollset_poll failed with status " << status << LL_ENDL;
+ // }
+ else
{
- LL_WARNS("PluginPoll") << "apr_pollset_poll failed with status " << status << LL_ENDL;
+ LL_WARNS("PluginPoll") << "apr_pollset_poll failed with status " << status << " (" << APR_TO_OS_ERROR(status) << ")" << LL_ENDL;
}
+ //
}
// Remove instances in the done state from the sInstances map.
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index 9fa14a1d70..c91790f9c0 100644
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -543,8 +543,11 @@ bool LLConversationLog::loadFromFile(const std::string& filename)
return false;
}
bool purge_required = false;
-
- char buffer[MAX_STRING];
+ // FIRE-30705 protect against silly display names that cause lines to exceed max string length
+ // char buffer[MAX_STRING];
+ static constexpr int BUFFER_1K { 1024 }; // long enough to handle the most extreme Unicode nonsense and some to spare
+ char buffer[BUFFER_1K];
+ //
char conv_name_buffer[MAX_STRING];
char part_id_buffer[MAX_STRING];
char conv_id_buffer[MAX_STRING];
@@ -555,12 +558,21 @@ bool LLConversationLog::loadFromFile(const std::string& filename)
// before CHUI-348 it was a flag of conversation voice state
int prereserved_unused;
- while (!feof(fp) && fgets(buffer, MAX_STRING, fp))
+ // FIRE-30705 protect against silly display names that cause lines to exceed max string length
+ // while (!feof(fp) && fgets(buffer, MAX_STRING, fp))
+ // {
+ // conv_name_buffer[0] = '\0';
+ // part_id_buffer[0] = '\0';
+ // conv_id_buffer[0] = '\0';
+ memset( buffer, '\0', BUFFER_1K );
+ while (!feof(fp) && fgets(buffer, BUFFER_1K, fp))
{
- conv_name_buffer[0] = '\0';
- part_id_buffer[0] = '\0';
- conv_id_buffer[0] = '\0';
-
+ // force blank for added safety
+ memset( conv_name_buffer, '\0', MAX_STRING );
+ memset( part_id_buffer, '\0', MAX_STRING );
+ memset( conv_id_buffer, '\0', MAX_STRING );
+ memset( history_file_name, '\0', MAX_STRING );
+ //
sscanf(buffer, "[%lld] %d %d %d %[^|]| %s %s %[^|]|",
&time,
&stype,
@@ -598,6 +610,7 @@ bool LLConversationLog::loadFromFile(const std::string& filename)
}
mConversations.push_back(conversation);
+ memset( buffer, '\0', BUFFER_1K ); // FIRE-30705 clear buffer down
}
fclose(fp);