From: Maxim Mamontov Date: Wed, 14 Sep 2011 14:35:30 +0000 (+0300) Subject: Initialize arcs member in all OID constructors X-Git-Tag: 2.408-rc1~54 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/6d81055d46da8559155869c7c2762c814bb02d23 Initialize arcs member in all OID constructors --- 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);