diff options
Diffstat (limited to 'src/asn1')
-rw-r--r-- | src/asn1/asn1_oid.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/asn1/asn1_oid.cpp b/src/asn1/asn1_oid.cpp index 7db171fc8..6c420ff0d 100644 --- a/src/asn1/asn1_oid.cpp +++ b/src/asn1/asn1_oid.cpp @@ -20,7 +20,15 @@ OID::OID(const std::string& oid_str) { if(oid_str != "") { - id = parse_asn1_oid(oid_str); + try + { + id = parse_asn1_oid(oid_str); + } + catch(...) + { + throw Invalid_OID(oid_str); + } + if(id.size() < 2 || id[0] > 2) throw Invalid_OID(oid_str); if((id[0] == 0 || id[0] == 1) && id[1] > 39) |