From 190582adf416790e072ec5a605bd43048a82784a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 2 Oct 2022 13:47:09 -0700 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20truncate=20seccomp-filter=20diag?= =?utf8?q?nostic?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * lib-src/seccomp-filter.c (fail): Do not truncate diagnostic arbitrarily to 1000 bytes when ERROR is nonzero. --- lib-src/seccomp-filter.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lib-src/seccomp-filter.c b/lib-src/seccomp-filter.c index 061af9dc072..041bf5c749b 100644 --- a/lib-src/seccomp-filter.c +++ b/lib-src/seccomp-filter.c @@ -69,19 +69,16 @@ fail (int error, const char *format, ...) { va_list ap; va_start (ap, format); + vfprintf (stderr, format, ap); + va_end (ap); if (error == 0) - { - vfprintf (stderr, format, ap); - fputc ('\n', stderr); - } + fputc ('\n', stderr); else { - char buffer[1000]; - vsnprintf (buffer, sizeof buffer, format, ap); + fputs (": ", stderr); errno = error; - perror (buffer); + perror (NULL); } - va_end (ap); fflush (NULL); exit (EXIT_FAILURE); } -- 2.39.2