1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

Remove CHECK_STRING, CHECK_STRING_NULL_OK and __ubp_memchr.

This commit is contained in:
Joseph Myers
2013-02-04 16:29:39 +00:00
parent 903ae060db
commit 6277fdabc0
39 changed files with 143 additions and 130 deletions

View File

@ -21,7 +21,8 @@
#include <sysdep.h>
#include <alloca.h>
#include <sys/syscall.h>
#include <bp-checks.h>
/* Consider moving to syscalls.list. */
int
__execve (file, argv, envp)
@ -29,34 +30,6 @@ __execve (file, argv, envp)
char *const argv[];
char *const envp[];
{
#if __BOUNDED_POINTERS__
{
char *const *v;
int i;
char *__unbounded *__unbounded ubp_argv;
char *__unbounded *__unbounded ubp_envp;
char *__unbounded *__unbounded ubp_v;
for (v = argv; *v; v++)
;
i = v - argv + 1;
ubp_argv = (char *__unbounded *__unbounded) alloca (sizeof (*ubp_argv) * i);
for (v = argv, ubp_v = ubp_argv; --i; v++, ubp_v++)
*ubp_v = CHECK_STRING (*v);
*ubp_v = 0;
for (v = envp; *v; v++)
;
i = v - envp + 1;
ubp_envp = (char *__unbounded *__unbounded) alloca (sizeof (*ubp_envp) * i);
for (v = envp, ubp_v = ubp_envp; --i; v++, ubp_v++)
*ubp_v = CHECK_STRING (*v);
*ubp_v = 0;
return INLINE_SYSCALL (execve, 3, CHECK_STRING (file), ubp_argv, ubp_envp);
}
#else
return INLINE_SYSCALL (execve, 3, file, argv, envp);
#endif
}
weak_alias (__execve, execve)