about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/unix/sysv/linux/fexecve.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0efae2bb04..67fbee762a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-09-19  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/fexecve.c (fexecve) [__NR_execveat]:
+	Explicitly take address of first element of array arguments in
+	call to INLINE_SYSCALL.
+
 2017-09-19  Andreas Schwab  <schwab@suse.de>
 
 	[BZ #22134]
diff --git a/sysdeps/unix/sysv/linux/fexecve.c b/sysdeps/unix/sysv/linux/fexecve.c
index 3bf5de507f..40652494fa 100644
--- a/sysdeps/unix/sysv/linux/fexecve.c
+++ b/sysdeps/unix/sysv/linux/fexecve.c
@@ -39,7 +39,8 @@ fexecve (int fd, char *const argv[], char *const envp[])
     }
 
 #ifdef __NR_execveat
-  INLINE_SYSCALL (execveat, 5, fd, "", argv, envp, AT_EMPTY_PATH);
+  /* Avoid implicit array coercion in syscall macros.  */
+  INLINE_SYSCALL (execveat, 5, fd, "", &argv[0], &envp[0], AT_EMPTY_PATH);
 # ifndef __ASSUME_EXECVEAT
   if (errno != ENOSYS)
     return -1;