about summary refs log tree commit diff
path: root/sysdeps/i386/i686/mempcpy.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/i686/mempcpy.S')
-rw-r--r--sysdeps/i386/i686/mempcpy.S10
1 files changed, 7 insertions, 3 deletions
diff --git a/sysdeps/i386/i686/mempcpy.S b/sysdeps/i386/i686/mempcpy.S
index c851d06d44..685c599742 100644
--- a/sysdeps/i386/i686/mempcpy.S
+++ b/sysdeps/i386/i686/mempcpy.S
@@ -21,6 +21,7 @@
 
 #include <sysdep.h>
 #include "asm-syntax.h"
+#include "bp-sym.h"
 #include "bp-asm.h"
 
 #define PARMS	LINKAGE		/* no space for saved regs */
@@ -30,14 +31,16 @@
 #define LEN	SRC+PTR_SIZE
 
 	.text
-ENTRY(__mempcpy)
+ENTRY (BP_SYM (__mempcpy))
 	ENTER
 
 	movl	LEN(%esp), %ecx
 	movl	%edi, %eax
 	movl	DEST(%esp), %edi
+	CHECK_BOUNDS_BOTH_WIDE (%edi, DEST(%esp), %ecx)
 	movl	%esi, %edx
 	movl	SRC(%esp), %esi
+	CHECK_BOUNDS_BOTH_WIDE (%esi, SRC(%esp), %ecx)
 	cld
 	shrl	$1, %ecx
 	jnc	1f
@@ -49,8 +52,9 @@ ENTRY(__mempcpy)
 	movsl
 	xchgl	%edi, %eax
 	movl	%edx, %esi
+	RETURN_BOUNDED_POINTER (DEST(%esp))
 
 	LEAVE
 	RET_PTR
-END(__mempcpy)
-weak_alias (__mempcpy, mempcpy)
+END (BP_SYM (__mempcpy))
+weak_alias (BP_SYM (__mempcpy), BP_SYM (mempcpy))