diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-01-20 01:37:17 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-01-20 01:37:17 +0000 |
commit | 6e6bc352b18ae230833580018b246d9a7ce331a6 (patch) | |
tree | 0a4bc7f589e513c956925ca9c3d8650bdd61aa10 /crypto/asn1/a_mbstr.c | |
parent | 77b47b903684020d07d16519b2a74cc58668fb20 (diff) |
Finish off the X509_ATTRIBUTE string stuff.
Diffstat (limited to 'crypto/asn1/a_mbstr.c')
-rw-r--r-- | crypto/asn1/a_mbstr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asn1/a_mbstr.c b/crypto/asn1/a_mbstr.c index ca8d9ea951..7a710d5459 100644 --- a/crypto/asn1/a_mbstr.c +++ b/crypto/asn1/a_mbstr.c @@ -142,14 +142,14 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, return -1; } - if(minsize && (nchar < minsize)) { + if((minsize > 0) && (nchar < minsize)) { ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_STRING_TOO_SHORT); sprintf(strbuf, "%ld", minsize); ERR_add_error_data(2, "minsize=", strbuf); return -1; } - if(maxsize && (nchar > maxsize)) { + if((maxsize > 0) && (nchar > maxsize)) { ASN1err(ASN1_F_ASN1_MBSTRING_COPY, ASN1_R_STRING_TOO_LONG); sprintf(strbuf, "%ld", maxsize); ERR_add_error_data(2, "maxsize=", strbuf); |