Only accept exact match for modifier or tag name
authorDr. Stephen Henson <steve@openssl.org>
Wed, 13 Nov 2002 00:57:41 +0000 (00:57 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 13 Nov 2002 00:57:41 +0000 (00:57 +0000)
crypto/asn1/asn1_gen.c

index d6f7c9b31ed62e9f37f125dc77dbd4d20e0db29a..62c2c154d1484d0bcf20037ed12a8fa0ce805738 100644 (file)
@@ -600,7 +600,7 @@ static int asn1_str2tag(const char *tagstr, int len)
        tntmp = tnst;   
        for (i = 0; i < sizeof(tnst) / sizeof(struct tag_name_st); i++, tntmp++)
                {
-               if (!strncmp(tntmp->strnam, tagstr, tntmp->len))
+               if ((len == tntmp->len) && !strncmp(tntmp->strnam, tagstr, len))
                        return tntmp->tag;
                }