BNetworkAddress: accept NULL link address strings.
This commit is contained in:
@@ -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)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user