aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorPaul Eggert2011-05-04 00:19:21 -0700
committerPaul Eggert2011-05-04 00:19:21 -0700
commitc378da0b47eb8c26fc8da4d89e128ee3c73537de (patch)
tree69780b09fd68c972f69c1414d48c84cb24a075fa /src/eval.c
parent288b08c747644d42c1636c2b469f8c34836ccd35 (diff)
downloademacs-c378da0b47eb8c26fc8da4d89e128ee3c73537de.tar.gz
emacs-c378da0b47eb8c26fc8da4d89e128ee3c73537de.zip
Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index 90ef02ef37b..6b4182cb319 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2002,7 +2002,10 @@ verror (const char *m, va_list ap)
2002 2002
2003 while (1) 2003 while (1)
2004 { 2004 {
2005 used = doprnt (buffer, size, m, m + mlen, ap); 2005 va_list ap_copy;
2006 va_copy (ap_copy, ap);
2007 used = doprnt (buffer, size, m, m + mlen, ap_copy);
2008 va_end (ap_copy);
2006 2009
2007 /* Note: the -1 below is because `doprnt' returns the number of bytes 2010 /* Note: the -1 below is because `doprnt' returns the number of bytes
2008 excluding the terminating null byte, and it always terminates with a 2011 excluding the terminating null byte, and it always terminates with a