about summary refs log tree commit diff
path: root/sysdeps/i386/i586/memcpy.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/i586/memcpy.S')
-rw-r--r--sysdeps/i386/i586/memcpy.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/i386/i586/memcpy.S b/sysdeps/i386/i586/memcpy.S
index 6ab457fc55..677a7e6204 100644
--- a/sysdeps/i386/i586/memcpy.S
+++ b/sysdeps/i386/i586/memcpy.S
@@ -35,6 +35,13 @@
 #define LEN	SRC+PTR_SIZE
 
         .text
+#if defined PIC && !defined NOT_IN_libc
+ENTRY (__memcpy_chk)
+	movl	12(%esp), %eax
+	cmpl	%eax, 16(%esp)
+	jb	HIDDEN_JUMPTARGET (__chk_fail)
+END (__memcpy_chk)
+#endif
 ENTRY (BP_SYM (memcpy))
 	ENTER