[Glibc-bsd-commits] r3303 - trunk/glibc-ports/kfreebsd

Aurelien Jarno aurel32 at alioth.debian.org
Tue May 24 14:45:35 UTC 2011


Author: aurel32
Date: 2011-05-24 14:45:34 +0000 (Tue, 24 May 2011)
New Revision: 3303

Modified:
   trunk/glibc-ports/kfreebsd/if_index.c
Log:
Fix reverse test in if_index() causing crash with more than 3 interfaces


Modified: trunk/glibc-ports/kfreebsd/if_index.c
===================================================================
--- trunk/glibc-ports/kfreebsd/if_index.c	2011-05-24 07:22:40 UTC (rev 3302)
+++ trunk/glibc-ports/kfreebsd/if_index.c	2011-05-24 14:45:34 UTC (rev 3303)
@@ -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