Hello,

On Friday 26 June 2009, Giuseppe Iuculano wrote:
> reassign 534437 libnet 1.1.4-1
> retitle 534437 multiple libnet_init() causes libnet 1.1.4-1 to SEGV

I believe I've found the bug. The following patch seems to fix it. I've made a 
new version (1.1.4-2) of libnet so test that one when it will be available.

If you're in hurry you can get the not-yet-uploaded sources:

dget -u http://mentors.debian.net/debian/pool/main/l/libnet/libnet_1.1.4-2.dsc

and build it yourself.

Here's the patch:

--- libnet-1.1.4.orig/src/libnet_if_addr.c      2009-06-27 14:48:56.084093427 
+0300
+++ libnet-1.1.4/src/libnet_if_addr.c   2009-06-27 14:49:30.081249393 +0300
@@ -240,6 +240,7 @@
         {
             /* fix memory leak */
             free(al->device);
+           al->device = NULL;
         }
         if ((al->device = strdup(device)) == NULL)
         {
@@ -406,6 +407,7 @@
     for (i = 0; i < c; i++)
     {
         free(al[i].device);
+       al[i].device = NULL;
     }
     return (1);
 
@@ -413,6 +415,7 @@
     for (i = 0; i < c; i++)
     {
         free(al[i].device);
+       al[i].device = NULL;
     }
     return (-1);
 }




-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to