Commit 0b576acd authored by Davis King's avatar Davis King

Made the network_address constructor do a little more input validation.

parent 56c6d33c
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment