aboutsummaryrefslogtreecommitdiff
path: root/rfc4251.h
diff options
context:
space:
mode:
authorTimo Weingärtner <timo@tiwe.de>2014-04-17 21:30:27 +0200
committerTimo Weingärtner <timo@tiwe.de>2014-04-17 21:37:16 +0200
commit185d1b9525cb132bc802cdecbc6901ed30d58555 (patch)
tree3d5f50e80c67674e95e79bd18bbf1551b3b82682 /rfc4251.h
parentec5920ac2ed11b29135acb834ce6d633259aad75 (diff)
downloadssh-agent-filter-185d1b9525cb132bc802cdecbc6901ed30d58555.tar.gz
rfc4251string: drop unused and dangerous constructor from just a pointer
better use std::istringstream or boost::iostream::array_source
Diffstat (limited to 'rfc4251.h')
-rw-r--r--rfc4251.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/rfc4251.h b/rfc4251.h
index e9b94f2..876db07 100644
--- a/rfc4251.h
+++ b/rfc4251.h
@@ -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"};