Commit 6e87d2e2 authored by Michael Jerris's avatar Michael Jerris Committed by Pekka Pessi

su: fix buffer size in su_uniqueid

parent 9f68a1ab
......@@ -217,8 +217,10 @@ sofia_su_uniqueid_destructor(void)
#endif
#endif
#define SIZEOF_NODE 6
static
void init_node(uint8_t node[6])
void init_node(uint8_t node[SIZEOF_NODE])
{
#if HAVE_GETIFADDRS && HAVE_SOCKADDR_LL
struct ifaddrs *ifa, *results;
......@@ -239,7 +241,7 @@ void init_node(uint8_t node[6])
continue;
}
memcpy(node, sll->sll_addr, 6);
memcpy(node, sll->sll_addr, SIZEOF_NODE);
break;
#endif
......@@ -252,11 +254,11 @@ void init_node(uint8_t node[6])
}
#endif
su_randmem(node, 6);
su_randmem(node, SIZEOF_NODE);
node[0] |= 1; /* "multicast" address */
}
static unsigned char node[6];
static unsigned char node[SIZEOF_NODE];
size_t su_node_identifier(void *address, size_t addrlen)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment