Fix nid assignment in ASN1_STRING_TABLE_add
authorlolyonok <archylog@gmail.com>
Fri, 14 Jul 2017 15:22:12 +0000 (18:22 +0300)
committerRich Salz <rsalz@openssl.org>
Mon, 24 Jul 2017 12:12:21 +0000 (08:12 -0400)
CLA: trivial

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3934)

crypto/asn1/a_strnid.c

index ce8a6461f9e7f56af4922fbe68d9dd2118666a38..df4ea2af3ce4febddb9388d078374085e570b4be 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1999-2017 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the OpenSSL license (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -167,6 +167,7 @@ static ASN1_STRING_TABLE *stable_get(int nid)
         rv->mask = tmp->mask;
         rv->flags = tmp->flags | STABLE_FLAGS_MALLOC;
     } else {
+        rv->nid = nid;
         rv->minsize = -1;
         rv->maxsize = -1;
         rv->flags = STABLE_FLAGS_MALLOC;