mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Made the network_address constructor do a little more input validation.
This commit is contained in:
parent
56c6d33c4a
commit
0b576acd8c
@ -26,7 +26,7 @@ namespace dlib
|
||||
{
|
||||
std::istringstream sin(full_address);
|
||||
sin >> *this;
|
||||
if (!sin)
|
||||
if (!sin || sin.peek() != EOF)
|
||||
throw invalid_network_address("invalid network address: " + full_address);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user