mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-30 13:47:10 +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:
@@ -585,7 +585,7 @@ Poco::BinaryWriter& operator << (Poco::BinaryWriter& writer, const Poco::Net::IP
|
|||||||
|
|
||||||
Poco::BinaryReader& operator >> (Poco::BinaryReader& reader, Poco::Net::IPAddress& value)
|
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;
|
Poco::UInt8 length;
|
||||||
reader >> length;
|
reader >> length;
|
||||||
reader.readRaw(buf, length);
|
reader.readRaw(buf, length);
|
||||||
|
|||||||
Reference in New Issue
Block a user