mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-30 17:58:37 +08:00
UI: Address logging buffer size discrepancies
This commit is contained in:
+3
-2
@@ -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
@@ -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
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user