diff options
| author | Timo Weingärtner <timo@tiwe.de> | 2014-04-17 21:30:27 +0200 | 
|---|---|---|
| committer | Timo Weingärtner <timo@tiwe.de> | 2014-04-17 21:37:16 +0200 | 
| commit | 185d1b9525cb132bc802cdecbc6901ed30d58555 (patch) | |
| tree | 3d5f50e80c67674e95e79bd18bbf1551b3b82682 | |
| parent | ec5920ac2ed11b29135acb834ce6d633259aad75 (diff) | |
| download | ssh-agent-filter-185d1b9525cb132bc802cdecbc6901ed30d58555.tar.gz | |
rfc4251string: drop unused and dangerous constructor from just a pointer
better use std::istringstream or boost::iostream::array_source
| -rw-r--r-- | rfc4251.h | 6 | 
1 files changed, 0 insertions, 6 deletions
| @@ -157,7 +157,6 @@ struct rfc4251string : boost::totally_ordered<rfc4251string> {  	std::vector<char> value;  	rfc4251string () = default; -	inline explicit rfc4251string (char const *);  	inline explicit rfc4251string (char const *, size_t);  	explicit rfc4251string (std::string const & s) : rfc4251string{s.data(), s.size()} {}  	explicit rfc4251string (std::vector<std::string> const &); @@ -170,11 +169,6 @@ struct rfc4251string : boost::totally_ordered<rfc4251string> {  	operator mpz_class () const;  }; -inline rfc4251string::rfc4251string (char const * s) { -	auto len = ntohl(*reinterpret_cast<uint32_t const *>(s)); -	value.insert(value.begin(), s + 4, s + 4 + len); -} -  inline rfc4251string::rfc4251string (char const * s, size_t l) {  	if (l > std::numeric_limits<uint32_t>::max())  		throw std::length_error{"32-bit limit for rfc4251string exceeded"}; | 
