summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatej Habrnal <mhabrnal@redhat.com>2016-09-26 17:28:58 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-09-26 11:28:58 -0400
commita5ca3649d34c5649ca04fc81000a80e476a81a64 (patch)
treebcb1f68b361eb671d116b15ab79100363367288e /src
parentd23a0044a3ba9ebff5e4e304152fd24ecf113524 (diff)
coredump: initialize coredump_size in submit_coredump() (#4219)
If ulimit is smaller than page_size(), function save_external_coredump() returns -EBADSLT and this causes skipping whole core dumping part in submit_coredump(). Initializing coredump_size to UINT64_MAX prevents evaluating a condition with uninitialized varialbe which leads to calling allocate_journal_field() with coredump_fd = -1 which causes aborting. Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/coredump/coredump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c
index 9dea10b3e1..7cc3f3fca2 100644
--- a/src/coredump/coredump.c
+++ b/src/coredump/coredump.c
@@ -678,7 +678,7 @@ static int submit_coredump(
_cleanup_close_ int coredump_fd = -1, coredump_node_fd = -1;
_cleanup_free_ char *core_message = NULL, *filename = NULL, *coredump_data = NULL;
- uint64_t coredump_size;
+ uint64_t coredump_size = UINT64_MAX;
int r;
assert(context);