about summary refs log tree commit diff
path: root/sysdeps/i386/i486/strcat.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/i486/strcat.S')
-rw-r--r--sysdeps/i386/i486/strcat.S11
1 files changed, 8 insertions, 3 deletions
diff --git a/sysdeps/i386/i486/strcat.S b/sysdeps/i386/i486/strcat.S
index c4ab170389..a37511f1c8 100644
--- a/sysdeps/i386/i486/strcat.S
+++ b/sysdeps/i386/i486/strcat.S
@@ -22,6 +22,7 @@
 
 #include <sysdep.h>
 #include "asm-syntax.h"
+#include "bp-sym.h"
 #include "bp-asm.h"
 
 #define PARMS	LINKAGE+4	/* space for 1 saved reg */
@@ -30,13 +31,15 @@
 #define SRC	DEST+PTR_SIZE
 
 	.text
-ENTRY (strcat)
+ENTRY (BP_SYM (strcat))
 	ENTER
 
 	pushl %edi		/* Save callee-safe register.  */
 
 	movl DEST(%esp), %edx
 	movl SRC(%esp), %ecx
+	CHECK_BOUNDS_LOW (%edx, DEST(%esp))
+	CHECK_BOUNDS_LOW (%ecx, SRC(%esp))
 
 	testb $0xff, (%ecx)	/* Is source string empty? */
 	jz L(8)			/* yes => return */
@@ -256,9 +259,11 @@ L(9):	movb %al, (%ecx,%edx)	/* store first byte of last word */
 
 	movb %ah, 3(%ecx,%edx)	/* store fourth byte of last word */
 
-L(8):	movl DEST(%esp), %eax	/* start address of destination is result */
+L(8):	/* GKM FIXME: check high bounds */
+	movl DEST(%esp), %eax	/* start address of destination is result */
+	RETURN_BOUNDED_POINTER (DEST(%esp))
 	popl %edi		/* restore saved register */
 
 	LEAVE
 	RET_PTR
-END (strcat)
+END (BP_SYM (strcat))