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.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/i386/i686/mempcpy.S b/sysdeps/i386/i686/mempcpy.S
index 3ea89d4a17..843a35823a 100644
--- a/sysdeps/i386/i686/mempcpy.S
+++ b/sysdeps/i386/i686/mempcpy.S
@@ -31,6 +31,13 @@
 #define LEN	SRC+PTR_SIZE
 
 	.text
+#if defined PIC && !defined NOT_IN_libc
+ENTRY (__mempcpy_chk)
+	movl	12(%esp), %eax
+	cmpl	%eax, 16(%esp)
+	jb	HIDDEN_JUMPTARGET (__chk_fail)
+END (__mempcpy_chk)
+#endif
 ENTRY (BP_SYM (__mempcpy))
 	ENTER