]> git.pld-linux.org Git - packages/glibc.git/commitdiff
- store SIOCGIFCONF results in reallocated buffer instead of nowhere
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 26 Jul 2004 12:11:27 +0000 (12:11 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  (caught by assert in res_hconf.c)

Changed files:
    glibc-ifreq.patch -> 1.1

glibc-ifreq.patch [new file with mode: 0644]

diff --git a/glibc-ifreq.patch b/glibc-ifreq.patch
new file mode 100644 (file)
index 0000000..71463dd
--- /dev/null
@@ -0,0 +1,19 @@
+--- libc/sysdeps/unix/sysv/linux/ifreq.c.orig  Fri May  7 05:57:37 2004
++++ libc/sysdeps/unix/sysv/linux/ifreq.c       Mon Jul 26 13:58:08 2004
+@@ -71,6 +71,8 @@
+     {
+       ifc.ifc_len = rq_len;
+       void *newp = realloc (ifc.ifc_buf, ifc.ifc_len);
++      if (newp != NULL)
++      ifc.ifc_buf = newp;
+       if (newp == NULL || __ioctl (fd, SIOCGIFCONF, &ifc) < 0)
+       {
+         free (ifc.ifc_buf);
+@@ -82,7 +84,6 @@
+         *ifreqs = NULL;
+         return;
+       }
+-      ifc.ifc_buf = newp;
+       if (!old_siocgifconf || ifc.ifc_len < rq_len)
+       break;
This page took 0.128003 seconds and 4 git commands to generate.