Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions libopendmarc/opendmarc_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,15 @@ typedef struct {
#define OPENDMARC_MIN_SHELVES (1 << OPENDMARC_MIN_SHELVES_LG2)

/*
* max * sizeof internal_entry must fit into size_t.
* assumes internal_entry is <= 32 (2^5) bytes.
* Largest table size opendmarc_hash_init() will honor. The real
* caller (opendmarc_tld.c) only ever asks for 8192; this just keeps a
* runaway or hostile tablesize argument from reaching calloc(). Fixed
* well below any allocator limit rather than derived from sizeof(size_t),
* since the size of OPENDMARC_HASH_SHELF (which includes a pthread_mutex_t)
* varies by platform and a sizeof-derived bound can creep past what
* calloc() will actually allocate.
*/
#define OPENDMARC_MAX_SHELVES_LG2 (sizeof (size_t) * 8 - 1 - 5)
#define OPENDMARC_MAX_SHELVES_LG2 24
#define OPENDMARC_MAX_SHELVES ((size_t)1 << OPENDMARC_MAX_SHELVES_LG2)

typedef struct {
Expand Down
1 change: 1 addition & 0 deletions libopendmarc/tests/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
AUTOMAKE_OPTIONS = subdir-objects
SUBDIRS=testfiles
LDADD = ../libopendmarc.la $(LIBRESOLV)
AM_CPPFLAGS = -I.. -I../..
Expand Down
2 changes: 1 addition & 1 deletion opendmarc/opendmarc.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#define REPORTCMD_EXIT_SUPPRESSED 2 /* ReportCommand sent nothing; all recipients were suppressed by policy (e.g. NoReportsList/StaleMARC), not an error */
#define JOBIDUNKNOWN "(unknown-jobid)"
#define MAXARGV 65536
#define MAXHEADER 4096
#define MAXHEADER 8192
#define TEMPFILE "/var/tmp/dmarcXXXXXX"

#define AUTHRESULTSHDR "Authentication-Results"
Expand Down
Loading