@@ -187,13 +187,18 @@ if (address1->address.ss_family != address2->address.ss_family) return false; switch (address1->address.ss_family) { case AF_INET: +#ifndef __wii__ if (address1->length < sizeof(struct sockaddr_in) || address2->length < sizeof(struct sockaddr_in)) @throw [OFInvalidArgumentException exception]; +#else + if (address1->length < 8 || address2->length < 8) + @throw [OFInvalidArgumentException exception]; +#endif sin_1 = (struct sockaddr_in*)&address1->address; sin_2 = (struct sockaddr_in*)&address2->address; if (sin_1->sin_port != sin_2->sin_port) @@ -240,12 +245,17 @@ hash += address->address.ss_family; switch (address->address.ss_family) { case AF_INET: +#ifndef __wii__ if (address->length < sizeof(struct sockaddr_in)) @throw [OFInvalidArgumentException exception]; +#else + if (address->length < 8) + @throw [OFInvalidArgumentException exception]; +#endif sin = (struct sockaddr_in*)&address->address; hash += (sin->sin_port << 1); hash ^= sin->sin_addr.s_addr;