]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
coredump: add four assert()s
authorLennart Poettering <lennart@poettering.net>
Thu, 10 Aug 2023 10:11:33 +0000 (12:11 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 10 Aug 2023 10:11:33 +0000 (12:11 +0200)
src/coredump/coredump.c

index 8469ab297c36c599efa7bc39f4afccf500910a3f..4898a6f83df5f3db632ecd90c86edfa3b42cd9f6 100644 (file)
@@ -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.) */