diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 76d3c8cea2..fa1f650113 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -450,8 +450,8 @@ void LLLogChat::loadChatHistory(const std::string& file_name, std::list& m } // If we got here, we managed to stat the file. - // Open the file to read - LLFILE* fptr = LLFile::fopen(log_file_name, "r"); /*Flawfinder: ignore*/ + // Open the file to read in binary mode to prevent interpreting other characters as EOF + LLFILE* fptr = LLFile::fopen(log_file_name, "rb"); /*Flawfinder: ignore*/ if (!fptr) { // Ok, this is strange but not really tragic in the big picture of things LL_WARNS("ChatHistory") << "Unable to read file " << log_file_name << " after stat was successful" << LL_ENDL; @@ -1181,7 +1181,7 @@ void LLLoadHistoryThread::loadHistory(const std::string& file_name, std::list