chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add __attribute__((const, pure, format)) in various places
[elogind.git]
/
src
/
journal
/
journald-native.c
diff --git
a/src/journal/journald-native.c
b/src/journal/journald-native.c
index 069114778b39926159f1e522fb377d4abe27a08d..f878dfc911a719a0501f961264a2e9b228f5d905 100644
(file)
--- a/
src/journal/journald-native.c
+++ b/
src/journal/journald-native.c
@@
-31,8
+31,10
@@
#include "journald-console.h"
#include "journald-syslog.h"
#include "journald-console.h"
#include "journald-syslog.h"
-#define ENTRY_SIZE_MAX (1024*1024*64)
-#define DATA_SIZE_MAX (1024*1024*64)
+/* Make sure not to make this smaller than the maximum coredump
+ * size. See COREDUMP_MAX in coredump.c */
+#define ENTRY_SIZE_MAX (1024*1024*768)
+#define DATA_SIZE_MAX (1024*1024*768)
static bool valid_user_field(const char *p, size_t l) {
const char *a;
static bool valid_user_field(const char *p, size_t l) {
const char *a;
@@
-121,11
+123,12
@@
void server_process_native_message(
/* A property follows */
/* A property follows */
- if (n+N_IOVEC_META_FIELDS >= m) {
+ /* n received properties, +1 for _TRANSPORT */
+ if (n + 1 + N_IOVEC_META_FIELDS >= m) {
struct iovec *c;
unsigned u;
struct iovec *c;
unsigned u;
- u = MAX((n
+N_IOVEC_META_FIELDS+1
) * 2U, 4U);
+ u = MAX((n
+ 1 + N_IOVEC_META_FIELDS
) * 2U, 4U);
c = realloc(iovec, u * sizeof(struct iovec));
if (!c) {
log_oom();
c = realloc(iovec, u * sizeof(struct iovec));
if (!c) {
log_oom();