remove unreachable code
[oweals/openssl.git] / crypto / asn1 / x_name.c
index 68fa34a207aa101b7eceaae9cefc39dd2f5eaa4e..07137ee91e2e4ddb7f577cf1175fcadcd98ed3a1 100644 (file)
@@ -313,7 +313,7 @@ static int x509_name_canon(X509_NAME *a)
        unsigned char *p;
        STACK *intname = NULL;
        STACK_OF(X509_NAME_ENTRY) *entries = NULL;
-       X509_NAME_ENTRY *entry, *tmpentry;
+       X509_NAME_ENTRY *entry, *tmpentry = NULL;
        int i, set = -1, ret = 0;
        if (a->canon_enc)
                {
@@ -428,7 +428,10 @@ static int asn1_string_canon(ASN1_STRING *out, ASN1_STRING *in)
                {
                /* If MSB set just copy across */
                if (*from & 0x80)
+                       {
                        *to++ = *from++;
+                       i++;
+                       }
                /* Collapse multiple spaces */
                else if (isspace(*from))
                        {