summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-10-02 13:47:09 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2022-10-02 13:47:56 -0700
commit190582adf416790e072ec5a605bd43048a82784a (patch)
tree016f9ecbb2a92e5843953dfd0524f3aa56a8a3af /lib-src
parent5598886adc9f7bc83ba9775151f839d4691128e4 (diff)
downloademacs-190582adf416790e072ec5a605bd43048a82784a.tar.gz
Don’t truncate seccomp-filter diagnostic
* lib-src/seccomp-filter.c (fail): Do not truncate diagnostic arbitrarily to 1000 bytes when ERROR is nonzero.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/seccomp-filter.c13
1 files 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);
}