From 6d81055d46da8559155869c7c2762c814bb02d23 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Wed, 14 Sep 2011 17:35:30 +0300 Subject: [PATCH 1/1] Initialize arcs member in all OID constructors --- projects/stargazer/plugins/other/smux/types.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/stargazer/plugins/other/smux/types.cpp b/projects/stargazer/plugins/other/smux/types.cpp index f9c5eb50..eb09a73c 100644 --- a/projects/stargazer/plugins/other/smux/types.cpp +++ b/projects/stargazer/plugins/other/smux/types.cpp @@ -53,12 +53,14 @@ return true; } OID::OID(const std::string & str) + : arcs() { if (!StringToArcs(str.c_str(), str.length(), arcs)) throw std::runtime_error("Invalid oid"); } OID::OID(const char * str, size_t length) + : arcs() { if (!StringToArcs(str, length, arcs)) throw std::runtime_error("Invalid oid"); @@ -70,12 +72,14 @@ OID::OID(const std::vector & a) } OID::OID(const unsigned * a, size_t length) + : arcs() { std::vector newArcs(a, a + length); arcs.swap(newArcs); } OID::OID(OBJECT_IDENTIFIER_t * oid) + : arcs() { unsigned a[1024]; int count = OBJECT_IDENTIFIER_get_arcs(oid, a, sizeof(a[0]), 1024); -- 2.44.2