~ubuntu-branches/ubuntu/trusty/systemd/trusty

« back to all changes in this revision

Viewing changes to src/journal/journald-native.c

Tags: upstream-202
ImportĀ upstreamĀ versionĀ 202

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#include "journald-console.h"
32
32
#include "journald-syslog.h"
33
33
 
34
 
#define ENTRY_SIZE_MAX (1024*1024*64)
35
 
#define DATA_SIZE_MAX (1024*1024*64)
 
34
/* Make sure not to make this smaller than the maximum coredump
 
35
 * size. See COREDUMP_MAX in coredump.c */
 
36
#define ENTRY_SIZE_MAX (1024*1024*768)
 
37
#define DATA_SIZE_MAX (1024*1024*768)
36
38
 
37
39
static bool valid_user_field(const char *p, size_t l) {
38
40
        const char *a;
121
123
 
122
124
                /* A property follows */
123
125
 
124
 
                if (n+N_IOVEC_META_FIELDS >= m) {
 
126
                /* n received properties, +1 for _TRANSPORT */
 
127
                if (n + 1 + N_IOVEC_META_FIELDS >= m) {
125
128
                        struct iovec *c;
126
129
                        unsigned u;
127
130
 
128
 
                        u = MAX((n+N_IOVEC_META_FIELDS+1) * 2U, 4U);
 
131
                        u = MAX((n + 1 + N_IOVEC_META_FIELDS) * 2U, 4U);
129
132
                        c = realloc(iovec, u * sizeof(struct iovec));
130
133
                        if (!c) {
131
134
                                log_oom();