diff --git a/src/or/buffers.c b/src/or/buffers.c index 2a4342e3ef..fe6b8d739d 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -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. */ diff --git a/src/or/or.h b/src/or/or.h index 0eee10681b..5f7c2823a2 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -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 diff --git a/src/or/test.c b/src/or/test.c index 822c56b430..0e1c473010 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -118,7 +118,6 @@ remove_directory(void) static void test_buffers(void) { -#define MAX_BUF_SIZE 1024*1024 char str[256]; char str2[256];