Revert the size_t modifications from HEAD that had led to more
[openssl.git] / crypto / asn1 / a_mbstr.c
index 805d9c69bd5abedaf32572f7411b63d7381c2551..1bcd0468938e8380f75f8a62e8297c319c3a7ce3 100644 (file)
@@ -80,15 +80,15 @@ static int is_printable(unsigned long value);
  * The 'ncopy' form checks minimum and maximum size limits too.
  */
 
-int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, size_t len,
-                      int inform, unsigned long mask)
+int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
+                                       int inform, unsigned long mask)
 {
        return ASN1_mbstring_ncopy(out, in, len, inform, mask, 0, 0);
 }
 
-int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, size_t len,
-                       int inform, unsigned long mask, size_t minsize,
-                       size_t maxsize)
+int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
+                                       int inform, unsigned long mask, 
+                                       long minsize, long maxsize)
 {
        int str_type;
        int ret;
@@ -145,14 +145,14 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, size_t len,
 
        if((minsize > 0) && (nchar < minsize)) {
                ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT);
-               BIO_snprintf(strbuf, sizeof strbuf, "%ld", (long)minsize);
+               BIO_snprintf(strbuf, sizeof strbuf, "%ld", minsize);
                ERR_add_error_data(2, "minsize=", strbuf);
                return -1;
        }
 
        if((maxsize > 0) && (nchar > maxsize)) {
                ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG);
-               BIO_snprintf(strbuf, sizeof strbuf, "%ld", (long)maxsize);
+               BIO_snprintf(strbuf, sizeof strbuf, "%ld", maxsize);
                ERR_add_error_data(2, "maxsize=", strbuf);
                return -1;
        }