Typo.
[oweals/openssl.git] / crypto / asn1 / asn1_lib.c
index 504e612a853b4231d68d8f13d8a30f2667a59bd2..69ad869c971957e945106e73f35212097eb45084 100644 (file)
@@ -340,7 +340,7 @@ int asn1_GetSequence(ASN1_const_CTX *c, long *length)
        return(1);
        }
 
-ASN1_STRING *ASN1_STRING_dup(ASN1_STRING *str)
+ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *str)
        {
        ASN1_STRING *ret;
 
@@ -378,6 +378,7 @@ int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len)
 
                if (str->data == NULL)
                        {
+                       ASN1err(ASN1_F_ASN1_STRING_SET,ERR_R_MALLOC_FAILURE);
                        str->data=c;
                        return(0);
                        }
@@ -422,7 +423,7 @@ void ASN1_STRING_free(ASN1_STRING *a)
        OPENSSL_free(a);
        }
 
-int ASN1_STRING_cmp(ASN1_STRING *a, ASN1_STRING *b)
+int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b)
        {
        int i;
 
@@ -448,7 +449,7 @@ void asn1_add_error(const unsigned char *address, int offset)
        ERR_add_error_data(4,"address=",buf1," offset=",buf2);
        }
 
-int ASN1_STRING_length(ASN1_STRING *x)
+int ASN1_STRING_length(const ASN1_STRING *x)
 { return M_ASN1_STRING_length(x); }
 
 void ASN1_STRING_length_set(ASN1_STRING *x, int len)