Replace BUFSIZ with HCBUFSIZ and move them from stack to heap

This commit is contained in:
Jens Steube
2016-03-26 10:37:59 +01:00
parent 3f694cf960
commit 0fdebf904d
7 changed files with 123 additions and 85 deletions
+4 -5
View File
@@ -101,13 +101,12 @@ typedef uint64_t u64;
typedef uint32_t uint; // we need to get rid of this sooner or later, for consistency
#define EXEC_CACHE 128
#define EXEC_CACHE 128
#define SPEED_CACHE 128
#define SPEED_MAXAGE 4096
#define SPEED_CACHE 128
#define SPEED_MAXAGE 4096
#undef BUFSIZ
#define BUFSIZ 8192
#define HCBUFSIZ 0x10000 // general large space buffer size in case the size is unknown at compile-time
/**
* functions
+2 -2
View File
@@ -1666,8 +1666,8 @@ int mangle_title (char arr[BLOCK_SIZE], int arr_len);
int generate_random_rule (char rule_buf[RP_RULE_BUFSIZ], u32 rp_gen_func_min, u32 rp_gen_func_max);
int _old_apply_rule (char *rule, int rule_len, char in[BLOCK_SIZE], int in_len, char out[BLOCK_SIZE]);
int cpu_rule_to_kernel_rule (char rule_buf[BUFSIZ], uint rule_len, kernel_rule_t *rule);
int kernel_rule_to_cpu_rule (char rule_buf[BUFSIZ], kernel_rule_t *rule);
int cpu_rule_to_kernel_rule (char *rule_buf, uint rule_len, kernel_rule_t *rule);
int kernel_rule_to_cpu_rule (char *rule_buf, kernel_rule_t *rule);
void *thread_device_watch (void *p);
void *thread_keypress (void *p);