]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
seccomp: document path calculation 2976/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 6 May 2019 07:39:40 +0000 (09:39 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 6 May 2019 07:39:40 +0000 (09:39 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/seccomp.c

index bfbc19ac53c043bf03e3203b9eac6b10d6b7ecec..96ad03ff0bbb23cc224180d022934b4e7b060b33 100644 (file)
@@ -1338,7 +1338,10 @@ int seccomp_notify_handler(int fd, uint32_t events, void *data,
        __do_close_prot_errno int fd_mem = -EBADF;
        int reconnect_count, ret;
        ssize_t bytes;
-       char mem_path[6 + 21 + 5];
+       char mem_path[6 /* /proc/ */
+                     + INTTYPE_TO_STRLEN(int64_t)
+                     + 3 /* mem */
+                     + 1 /* \0 */];
        struct lxc_handler *hdlr = data;
        struct lxc_conf *conf = hdlr->conf;
        struct seccomp_notif *req = conf->seccomp.notifier.req_buf;