diff options
author | guenther <> | 2014-04-19 11:46:39 +0000 |
---|---|---|
committer | guenther <> | 2014-04-19 11:46:39 +0000 |
commit | f376030ff7fe24f4ad44a56c2d8ba8796c9ab3f0 (patch) | |
tree | 1c4f9b095801061d57e575e80f245cef8a59a27f /src/lib/libcrypto/asn1/a_mbstr.c | |
parent | 597610ccf04bbca4e88fac7988877d0a06e02211 (diff) | |
download | openbsd-f376030ff7fe24f4ad44a56c2d8ba8796c9ab3f0.tar.gz openbsd-f376030ff7fe24f4ad44a56c2d8ba8796c9ab3f0.tar.bz2 openbsd-f376030ff7fe24f4ad44a56c2d8ba8796c9ab3f0.zip |
We'll interpret a (void) cast on snprintf() to mean it's been verified that
truncation is either desirable, not an issue, or is detected and handled later
ok deraadt@
Diffstat (limited to 'src/lib/libcrypto/asn1/a_mbstr.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_mbstr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/a_mbstr.c b/src/lib/libcrypto/asn1/a_mbstr.c index 5a909d6ae2..6528161c41 100644 --- a/src/lib/libcrypto/asn1/a_mbstr.c +++ b/src/lib/libcrypto/asn1/a_mbstr.c | |||
@@ -150,14 +150,14 @@ ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
150 | 150 | ||
151 | if ((minsize > 0) && (nchar < minsize)) { | 151 | if ((minsize > 0) && (nchar < minsize)) { |
152 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT); | 152 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT); |
153 | (void) snprintf(strbuf, sizeof strbuf, "%ld", minsize); | 153 | snprintf(strbuf, sizeof strbuf, "%ld", minsize); |
154 | ERR_add_error_data(2, "minsize=", strbuf); | 154 | ERR_add_error_data(2, "minsize=", strbuf); |
155 | return -1; | 155 | return -1; |
156 | } | 156 | } |
157 | 157 | ||
158 | if ((maxsize > 0) && (nchar > maxsize)) { | 158 | if ((maxsize > 0) && (nchar > maxsize)) { |
159 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG); | 159 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG); |
160 | (void) snprintf(strbuf, sizeof strbuf, "%ld", maxsize); | 160 | snprintf(strbuf, sizeof strbuf, "%ld", maxsize); |
161 | ERR_add_error_data(2, "maxsize=", strbuf); | 161 | ERR_add_error_data(2, "maxsize=", strbuf); |
162 | return -1; | 162 | return -1; |
163 | } | 163 | } |