]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
memfd-util: use TASK_COMM_LEN at one more place
authorLennart Poettering <lennart@poettering.net>
Mon, 16 Dec 2024 10:04:03 +0000 (11:04 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 17 Dec 2024 17:26:15 +0000 (18:26 +0100)
Note this corrects the size of the array from 17 to 16, as the 16
already includes space for a trailing NUL.

src/basic/memfd-util.c

index 9ceb18cc2f3b51ac28afe561ad97fa748c7f766c..96bbba35e6f31763f38b0ac863fdf75fe4ec3cb4 100644 (file)
@@ -40,7 +40,7 @@ int memfd_new(const char *name) {
         _cleanup_free_ char *g = NULL;
 
         if (!name) {
-                char pr[17] = {};
+                char pr[TASK_COMM_LEN] = {};
 
                 /* If no name is specified we generate one. We include
                  * a hint indicating our library implementation, and