mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-23 15:14:37 +01:00
Use MAX_ADDRESS_LENGTH to determine buffer size
Modify operator>> to use IPAddress::MAX_ADDRESS_LENGTH to determine size of buf array. This will allow the operator>> to be compiled on platforms that does not support IPv6.
This commit is contained in:
parent
20f9320f2d
commit
79532cb172
@ -585,7 +585,7 @@ Poco::BinaryWriter& operator << (Poco::BinaryWriter& writer, const Poco::Net::IP
|
||||
|
||||
Poco::BinaryReader& operator >> (Poco::BinaryReader& reader, Poco::Net::IPAddress& value)
|
||||
{
|
||||
char buf[sizeof(struct in6_addr)];
|
||||
char buf[Poco::Net::IPAddress::MAX_ADDRESS_LENGTH];
|
||||
Poco::UInt8 length;
|
||||
reader >> length;
|
||||
reader.readRaw(buf, length);
|
||||
|
Loading…
x
Reference in New Issue
Block a user