about summary refs log tree commit diff
path: root/sysdeps/i386/i686/memset.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/i686/memset.S')
-rw-r--r--sysdeps/i386/i686/memset.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/i386/i686/memset.S b/sysdeps/i386/i686/memset.S
index 4ddcb39731..561188ffec 100644
--- a/sysdeps/i386/i686/memset.S
+++ b/sysdeps/i386/i686/memset.S
@@ -39,6 +39,13 @@
 #endif
 
         .text
+#if defined PIC && !defined NOT_IN_libc && !BZERO_P
+ENTRY (__memset_chk)
+	movl	12(%esp), %eax
+	cmpl	%eax, 16(%esp)
+	jb	HIDDEN_JUMPTARGET (__chk_fail)
+END (__memset_chk)
+#endif
 ENTRY (BP_SYM (memset))
 	ENTER