From e6aa443feb1946abe4253f7d0f99d753e55e2569 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 10 Aug 2023 12:11:33 +0200 Subject: [PATCH] coredump: add four assert()s --- src/coredump/coredump.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index 8469ab297c..4898a6f83d 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -1205,6 +1205,9 @@ static int gather_pid_metadata_from_argv( int r, signo; char *t; + assert(iovw); + assert(context); + /* We gather all metadata that were passed via argv[] into an array of iovecs that * we'll forward to the socket unit */ @@ -1258,6 +1261,9 @@ static int gather_pid_metadata(struct iovec_wrapper *iovw, Context *context) { const char *p; int r; + assert(iovw); + assert(context); + /* Note that if we fail on oom later on, we do not roll-back changes to the iovec * structure. (It remains valid, with the first iovec fields initialized.) */ -- 2.25.1