Skip to content

Commit

Permalink
Shrink launcher truncation to 126 to match syslog limit:
Browse files Browse the repository at this point in the history
Signed-off-by: 1000TurquoisePogs <[email protected]>
  • Loading branch information
1000TurquoisePogs committed Nov 15, 2023
1 parent e7436f6 commit fe03e15
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ extern char ** environ;

#define COMP_LIST_SIZE 1024

#define SYSLOG_MESSAGE_LENGTH_LIMIT 512
#define LAUNCHER_MESSAGE_LENGTH_LIMIT 512
#define SYSLOG_MESSAGE_LENGTH_LIMIT 126

#ifndef PATH_MAX
#define PATH_MAX _POSIX_PATH_MAX
Expand Down Expand Up @@ -208,7 +209,7 @@ static void launcher_syslog_on_match(const char* fmt, ...) {

/* All of this stuff here is because I can't do
#define INFO(fmt, ...) check_for_and_print_sys_message(fmt, ...) so let's make a string */
char input_string[SYSLOG_MESSAGE_LENGTH_LIMIT+1];
char input_string[LAUNCHER_MESSAGE_LENGTH_LIMIT+1];
va_list args;
va_start(args, fmt);
vsnprintf(input_string, sizeof(input_string), fmt, args);
Expand Down

0 comments on commit fe03e15

Please sign in to comment.