From: Lennart Poettering Date: Mon, 16 Dec 2024 10:04:03 +0000 (+0100) Subject: memfd-util: use TASK_COMM_LEN at one more place X-Git-Tag: v258-rc1~1831^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=caf1436ee8adab3cf3d50dbefc76f1dd5e64e281;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/basic/memfd-util.c b/src/basic/memfd-util.c index 9ceb18cc2f3..96bbba35e6f 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