base: Don't throw exception for valid netstrings.

This commit is contained in:
Gunnar Beutner 2013-09-02 11:09:29 +02:00
parent d5650c90c9
commit 6ed052ce85
1 changed files with 0 additions and 6 deletions

View File

@ -67,12 +67,6 @@ bool NetString::ReadStringFromStream(const Stream::Ptr& stream, String *str)
}
}
/* minimum netstring length is 3 */
if (read_length < 3) {
free(header);
BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid NetString (short header)"));
}
/* no leading zeros allowed */
if (header[0] == '0' && isdigit(header[1])) {
free(header);