UI: Address logging buffer size discrepancies

This commit is contained in:
jcm
2024-06-06 14:59:55 -05:00
committed by Rodney
parent 9d610316cb
commit bd36daa395
3 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -350,7 +350,7 @@ static inline bool too_many_repeated_entries(fstream &logFile, const char *msg,
static mutex log_mutex;
static const char *last_msg_ptr = nullptr;
static int last_char_sum = 0;
static char cmp_str[4096];
static char cmp_str[8192];
static int rep_count = 0;
int new_sum = sum_chars(output_str);
@@ -376,7 +376,8 @@ static inline bool too_many_repeated_entries(fstream &logFile, const char *msg,
}
last_msg_ptr = msg;
strcpy(cmp_str, output_str);
strncpy(cmp_str, output_str, sizeof(cmp_str));
cmp_str[sizeof(cmp_str) - 1] = 0;
last_char_sum = new_sum;
rep_count = 0;
+1 -1
View File
@@ -42,7 +42,7 @@
static inline void OBSErrorBoxva(QWidget *parent, const char *msg, va_list args)
{
char full_message[4096];
char full_message[8192];
vsnprintf(full_message, sizeof(full_message), msg, args);
QMessageBox::critical(parent, "Error", full_message);
+1 -1
View File
@@ -27,7 +27,7 @@ static void *crash_param = NULL;
static void def_log_handler(int log_level, const char *format, va_list args,
void *param)
{
char out[4096];
char out[8192];
vsnprintf(out, sizeof(out), format, args);
switch (log_level) {