fixed a memory corruption bug in the wins code
authorAndrew Tridgell <tridge@samba.org>
Tue, 6 Aug 2002 00:56:39 +0000 (00:56 +0000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Aug 2002 00:56:39 +0000 (00:56 +0000)
(This used to be commit 3f6ca04003172c22d02111f2170ad60f0d7936d9)

source3/lib/wins_srv.c

index adf405ae7e247b55b1f5e339e26e6cdab8129c90..61e77aca58717e5d1332fd9839500c9864f62c91 100644 (file)
@@ -236,7 +236,7 @@ char **wins_srv_tags(void)
                }
 
                /* add it to the list */
-               ret = (char **)Realloc(ret, (count+1) * sizeof(char *));
+               ret = (char **)Realloc(ret, (count+2) * sizeof(char *));
                ret[count] = strdup(t_ip.tag);
                if (!ret[count]) break;
                count++;