From: Paul Eggert Date: Sun, 2 Oct 2022 20:47:09 +0000 (-0700) Subject: Don’t truncate seccomp-filter diagnostic X-Git-Tag: emacs-29.0.90~1856^2~68 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=190582adf416790e072ec5a605bd43048a82784a;p=emacs.git Don’t truncate seccomp-filter diagnostic * lib-src/seccomp-filter.c (fail): Do not truncate diagnostic arbitrarily to 1000 bytes when ERROR is nonzero. --- 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); }