[Glibc-bsd-commits] r3660 - branches/squeeze/glibc-ports/kfreebsd

Petr Salinger ps-guest at alioth.debian.org
Mon Aug 1 06:55:05 UTC 2011


Author: ps-guest
Date: 2011-08-01 06:55:05 +0000 (Mon, 01 Aug 2011)
New Revision: 3660

Modified:
   branches/squeeze/glibc-ports/kfreebsd/if_index.c
Log:
merge r3303 - fix reverse test in if_index() causing crash with more than 3 interfaces



Modified: branches/squeeze/glibc-ports/kfreebsd/if_index.c
===================================================================
--- branches/squeeze/glibc-ports/kfreebsd/if_index.c	2011-08-01 06:53:48 UTC (rev 3659)
+++ branches/squeeze/glibc-ports/kfreebsd/if_index.c	2011-08-01 06:55:05 UTC (rev 3660)
@@ -227,8 +227,8 @@
     {
       size_t new_allocated =
 	(l->c_len + n < 2 * l->c_allocated + 1
-	 ? l->c_len + n
-	 : 2 * l->c_allocated + 1);
+	 ? 2 * l->c_allocated + 1
+	 : l->c_len + n);
       char *new_array = (char *) realloc (l->c_array, new_allocated);
       if (new_array == NULL)
 	{




More information about the Glibc-bsd-commits mailing list