BNetworkAddress: accept NULL link address strings.

This commit is contained in:
Axel Dörfler
2013-09-27 01:02:00 +02:00
parent 91de051305
commit a3c0790695
@@ -1,5 +1,5 @@
/* /*
* Copyright 2010-2011, Axel Dörfler, [email protected]. * Copyright 2010-2013, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
@@ -1211,6 +1211,9 @@ BNetworkAddress::operator const sockaddr&()
status_t status_t
BNetworkAddress::_ParseLinkAddress(const char* address) BNetworkAddress::_ParseLinkAddress(const char* address)
{ {
if (address == NULL)
return B_BAD_VALUE;
uint8 linkAddress[128]; uint8 linkAddress[128];
uint32 length = 0; uint32 length = 0;
while (length < sizeof(linkAddress)) { while (length < sizeof(linkAddress)) {