Skip to content

Commit

Permalink
[Rework] Use more predictable size for commands buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Oct 23, 2022
1 parent 0eabbc4 commit 5a13ff4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libserver/rspamd_control.h
Expand Up @@ -52,7 +52,7 @@ enum rspamd_srv_type {
enum rspamd_log_pipe_type {
RSPAMD_LOG_PIPE_SYMBOLS = 0,
};
#define CONTROL_PATHLEN 400
#define CONTROL_PATHLEN MIN(PATH_MAX, PIPE_BUF - sizeof(int) * 2)
struct rspamd_control_command {
enum rspamd_control_type type;
union {
Expand All @@ -69,8 +69,8 @@ struct rspamd_control_command {
guint unused;
} recompile;
struct {
gchar cache_dir[CONTROL_PATHLEN];
gboolean forced;
gchar cache_dir[CONTROL_PATHLEN];
} hs_loaded;
struct {
gchar tag[32];
Expand Down

0 comments on commit 5a13ff4

Please sign in to comment.