aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/bits/socket.h4
-rw-r--r--sysdeps/unix/sysv/linux/cmsg_nxthdr.c4
-rw-r--r--sysdeps/unix/sysv/linux/i386/makecontext.S16
3 files changed, 4 insertions, 20 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
index 0ec83ccff2..6ad4a5ed92 100644
--- a/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/bits/socket.h
@@ -268,8 +268,8 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
__cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ CMSG_ALIGN (__cmsg->cmsg_len));
- if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
- + __mhdr->msg_controllen)
+ if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
+ + __mhdr->msg_controllen)
|| ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
> ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
/* No more entries. */
diff --git a/sysdeps/unix/sysv/linux/cmsg_nxthdr.c b/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
index 22daab5ee3..b7de285e34 100644
--- a/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
+++ b/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
@@ -29,8 +29,8 @@ __cmsg_nxthdr (struct msghdr *mhdr, struct cmsghdr *cmsg)
cmsg = (struct cmsghdr *) ((unsigned char *) cmsg
+ CMSG_ALIGN (cmsg->cmsg_len));
- if ((unsigned char *) (cmsg + 1) >= ((unsigned char *) mhdr->msg_control
- + mhdr->msg_controllen)
+ if ((unsigned char *) (cmsg + 1) > ((unsigned char *) mhdr->msg_control
+ + mhdr->msg_controllen)
|| ((unsigned char *) cmsg + CMSG_ALIGN (cmsg->cmsg_len)
> ((unsigned char *) mhdr->msg_control + mhdr->msg_controllen)))
/* No more entries. */
diff --git a/sysdeps/unix/sysv/linux/i386/makecontext.S b/sysdeps/unix/sysv/linux/i386/makecontext.S
index 1ca3233945..56b5537ce3 100644
--- a/sysdeps/unix/sysv/linux/i386/makecontext.S
+++ b/sysdeps/unix/sysv/linux/i386/makecontext.S
@@ -40,22 +40,6 @@ ENTRY(__makecontext)
movl oLINK(%eax), %ecx
movl %ecx, -4(%edx)
- /* Copy the FS and GS segment register. */
- xorl %ecx, %ecx
- movw %gs, %cx
- movl %ecx, oGS(%eax)
- xorl %ecx, %ecx
- movw %fs, %cx
- movl %ecx, oFS(%eax)
-
- /* We have separate floating-point register content memory on the
- stack. We use the __fpregs_mem block in the context. Set the
- links up correctly. */
- leal oFPREGSMEM(%eax), %ecx
- movl %ecx, oFPREGS(%eax)
- /* Save the floating-point context. */
- fnstenv (%ecx)
-
/* Remember the number of parameters for the exit handler since
it has to remove them. We store the number in the EBX register
which the function we will call must preserve. */