about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--inet/Makefile4
-rw-r--r--inet/inet6_rth.c5
-rw-r--r--inet/tst-inet6_rth.c36
-rw-r--r--localedata/ChangeLog6
-rw-r--r--localedata/locales/mt_MT4
-rw-r--r--sysdeps/x86_64/dl-trampoline.S6
7 files changed, 60 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e7c4febf4..5a1e71aa1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
 
+	[BZ #9881]
+	* inet/inet6_rth.c (inet6_rth_add): Add some error checking.
+	Patch mostly by Yang Hongyang <yanghy@cn.fujitsu.com>.
+	* inet/Makefile (tests): Add tst-inet6_rth.
+	* inet/tst-inet6_rth.c: New file.
+
 	[BZ #5807]
 	* string/strlen.c (strlen): Fix omission in the expression to test
 	for NUL bytes.
@@ -22,7 +28,7 @@
 
 	[BZ #9893]
 	* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Fix
-	alignement of La_x86_64_regs.  Store xmm parameters.
+	alignment of La_x86_64_regs.  Store xmm parameters.
 	Patch mostly by Jiri Olsa <olsajiri@gmail.com>.
 
 	[BZ #9913]
diff --git a/inet/Makefile b/inet/Makefile
index 16b2aae683..37985940ae 100644
--- a/inet/Makefile
+++ b/inet/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1991-2006, 2007, 2009 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -53,7 +53,7 @@ aux := check_pf check_native ifreq
 
 tests := htontest test_ifindex tst-ntoa tst-ether_aton tst-network \
 	 tst-gethnm test-ifaddrs bug-if1 test-inet6_opt tst-ether_line \
-	 tst-getni1 tst-getni2
+	 tst-getni1 tst-getni2 tst-inet6_rth
 
 include ../Rules
 
diff --git a/inet/inet6_rth.c b/inet/inet6_rth.c
index 15f8240909..e0fad339a9 100644
--- a/inet/inet6_rth.c
+++ b/inet/inet6_rth.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2006.
 
@@ -93,6 +93,9 @@ inet6_rth_add (void *bp, const struct in6_addr *addr)
       struct ip6_rthdr0 *rthdr0;
     case IPV6_RTHDR_TYPE_0:
       rthdr0 = (struct ip6_rthdr0 *) rthdr;
+      if (rthdr0->ip6r0_len * 8 / sizeof (struct in6_addr)
+	  - rthdr0->ip6r0_segleft < 1)
+        return -1;
 
       memcpy (&rthdr0->ip6r0_addr[rthdr0->ip6r0_segleft++],
 	      addr, sizeof (struct in6_addr));
diff --git a/inet/tst-inet6_rth.c b/inet/tst-inet6_rth.c
new file mode 100644
index 0000000000..454a13f6b6
--- /dev/null
+++ b/inet/tst-inet6_rth.c
@@ -0,0 +1,36 @@
+#include <stdio.h>
+#include <netinet/ip6.h>
+
+static int
+do_test (void)
+{
+  int res = 0;
+  char buf[1000];
+  void *p = inet6_rth_init (buf, 24, IPV6_RTHDR_TYPE_0, 0);
+  if (p == NULL)
+    {
+      puts ("first inet6_rth_init failed");
+      res = 1;
+    }
+  else if (inet6_rth_add (p, &in6addr_any) == 0)
+    {
+      puts ("first inet6_rth_add succeeded");
+      res = 1;
+    }
+
+  p = inet6_rth_init (buf, 24, IPV6_RTHDR_TYPE_0, 1);
+  if (p == NULL)
+    {
+      puts ("second inet6_rth_init failed");
+      res = 1;
+    }
+  else if (inet6_rth_add (p, &in6addr_any) != 0)
+    {
+      puts ("second inet6_rth_add failed");
+      res = 1;
+    }
+  return res;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index fd54f7d654..6ed97d793b 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-15  Ulrich Drepper  <drepper@redhat.com>
+
+	[BZ #9891]
+	* locales/mt_MT: Fix spelling of August (Awwissu).
+	Patch by Martin Pitt.
+
 2009-03-14  Ulrich Drepper  <drepper@redhat.com>
 
 	[BZ #9916]
diff --git a/localedata/locales/mt_MT b/localedata/locales/mt_MT
index 81c134fde1..d6af96b1ef 100644
--- a/localedata/locales/mt_MT
+++ b/localedata/locales/mt_MT
@@ -188,7 +188,7 @@ day         "<U0069><U006C><U002D><U0126><U0061><U0064><U0064>";/
 abmon       "<U004A><U0061><U006E>";"<U0046><U0072><U0061>";/
             "<U004D><U0061><U0072>";"<U0041><U0070><U0072>";/
             "<U004D><U0065><U006A>";"<U0120><U0075><U006E>";/
-            "<U004C><U0075><U006C>";"<U0041><U0077><U0069>";/
+            "<U004C><U0075><U006C>";"<U0041><U0077><U0077>";/
             "<U0053><U0065><U0074>";"<U004F><U0074><U0074>";/
             "<U004E><U006F><U0076>";"<U0044><U0069><U010B>"
 %
@@ -200,7 +200,7 @@ mon         "<U004A><U0061><U006E><U006E><U0061><U0072>";/
             "<U004D><U0065><U006A><U006A><U0075>";/
             "<U0120><U0075><U006E><U006A><U0075>";/
             "<U004C><U0075><U006C><U006A><U0075>";/
-            "<U0041><U0077><U0069><U0073><U0073><U0075>";/
+            "<U0041><U0077><U0077><U0069><U0073><U0073><U0075>";/
             "<U0053><U0065><U0074><U0074><U0065><U006D><U0062><U0072><U0075>";/
             "<U004F><U0074><U0074><U0075><U0062><U0072><U0075>";/
             "<U004E><U006F><U0076><U0065><U006D><U0062><U0072><U0075>";/
diff --git a/sysdeps/x86_64/dl-trampoline.S b/sysdeps/x86_64/dl-trampoline.S
index 0ae47a47db..d8d9bc12a4 100644
--- a/sysdeps/x86_64/dl-trampoline.S
+++ b/sysdeps/x86_64/dl-trampoline.S
@@ -35,7 +35,7 @@ _dl_runtime_resolve:
 	movq %r8, 40(%rsp)
 	movq %r9, 48(%rsp)
 	movq 64(%rsp), %rsi	# Copy args pushed by PLT in register.
-	movq 56(%rsp), %rdi	# %rdi: link_map, %rsi: reloc_offset
+	movq 56(%rsp), %rdi	# %rdi: link_map, %rsi: reloc_index
 	call _dl_fixup		# Call resolver.
 	movq %rax, %r11		# Save return value
 	movq 48(%rsp), %r9	# Get register content back.
@@ -112,7 +112,7 @@ _dl_runtime_profile:
 	movq %rsp, %rcx		# La_x86_64_regs pointer to %rcx.
 	movq 48(%rbx), %rdx	# Load return address if needed.
 	movq 40(%rbx), %rsi	# Copy args pushed by PLT in register.
-	movq 32(%rbx), %rdi	# %rdi: link_map, %rsi: reloc_offset
+	movq 32(%rbx), %rdi	# %rdi: link_map, %rsi: reloc_index
 	leaq 16(%rbx), %r8
 	call _dl_profile_fixup	# Call resolver.
 
@@ -196,7 +196,7 @@ _dl_runtime_profile:
 
 	movq 24(%rbx), %rdx	# La_x86_64_regs argument to %rdx.
 	movq 40(%rbx), %rsi	# Copy args pushed by PLT in register.
-        movq 32(%rbx), %rdi	# %rdi: link_map, %rsi: reloc_offset
+        movq 32(%rbx), %rdi	# %rdi: link_map, %rsi: reloc_index
 	call _dl_call_pltexit
 
 	movq  (%rsp), %rax	# Restore return registers.