mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
tie MAX_DIR_SIZE to MAX_BUF_SIZE
resolve bug 80 svn:r4052
This commit is contained in:
@@ -22,8 +22,6 @@ struct buf_t {
|
||||
|
||||
/** Size, in bytes, for newly allocated buffers. Should be a power of 2. */
|
||||
#define INITIAL_BUF_SIZE (4*1024)
|
||||
/** Maximum size, in bytes, for resized buffers. */
|
||||
#define MAX_BUF_SIZE (1024*1024*10)
|
||||
/** Size, in bytes, for minimum 'shrink' size for buffers. Buffers may start
|
||||
* out smaller than this, but they will never autoshrink to less
|
||||
* than this size. */
|
||||
|
||||
+3
-1
@@ -154,7 +154,9 @@
|
||||
#define MAX_NICKNAME_LEN 19
|
||||
/* Hex digest plus dollar sign. */
|
||||
#define MAX_HEX_NICKNAME_LEN (HEX_DIGEST_LEN+1)
|
||||
#define MAX_DIR_SIZE 500000
|
||||
/** Maximum size, in bytes, for resized buffers. */
|
||||
#define MAX_BUF_SIZE ((1<<24)-1)
|
||||
#define MAX_DIR_SIZE MAX_BUF_SIZE
|
||||
|
||||
/* For http parsing */
|
||||
#define MAX_HEADERS_SIZE 50000
|
||||
|
||||
@@ -118,7 +118,6 @@ remove_directory(void)
|
||||
|
||||
static void
|
||||
test_buffers(void) {
|
||||
#define MAX_BUF_SIZE 1024*1024
|
||||
char str[256];
|
||||
char str2[256];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user