From caf1436ee8adab3cf3d50dbefc76f1dd5e64e281 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 16 Dec 2024 11:04:03 +0100 Subject: [PATCH] memfd-util: use TASK_COMM_LEN at one more place 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/memfd-util.c b/src/basic/memfd-util.c index 9ceb18cc2f..96bbba35e6 100644 --- a/src/basic/memfd-util.c +++ b/src/basic/memfd-util.c @@ -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