diff options
author | beck <> | 2014-04-26 18:56:38 +0000 |
---|---|---|
committer | beck <> | 2014-04-26 18:56:38 +0000 |
commit | 47bb6e76785f0b1c4d19d8d0a02f3eb3813f96e2 (patch) | |
tree | dff54039de6c4454b05953e2ce78edfc5693e6b5 /src/lib/libcrypto/asn1/asn1_lib.c | |
parent | 8f710803a9e330d7e3f2e62116ae5b3fc02bd6cf (diff) | |
download | openbsd-47bb6e76785f0b1c4d19d8d0a02f3eb3813f96e2.tar.gz openbsd-47bb6e76785f0b1c4d19d8d0a02f3eb3813f96e2.tar.bz2 openbsd-47bb6e76785f0b1c4d19d8d0a02f3eb3813f96e2.zip |
Replace all use of ERR_add_error_data with ERR_asprintf_error_data.
This avoids a lot of ugly gymnastics to do snprintfs before sending the
bag of strings to ERR, and eliminates at least one place in dso_dlfctn.c
where it was being called with the incorrect number of arguments and
using random things off the stack as addresses of strings.
ok krw@, jsing@
Diffstat (limited to 'src/lib/libcrypto/asn1/asn1_lib.c')
-rw-r--r-- | src/lib/libcrypto/asn1/asn1_lib.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/asn1_lib.c b/src/lib/libcrypto/asn1/asn1_lib.c index 4d4368aefe..c2f0837a1c 100644 --- a/src/lib/libcrypto/asn1/asn1_lib.c +++ b/src/lib/libcrypto/asn1/asn1_lib.c | |||
@@ -459,10 +459,7 @@ ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b) | |||
459 | void | 459 | void |
460 | asn1_add_error(const unsigned char *address, int offset) | 460 | asn1_add_error(const unsigned char *address, int offset) |
461 | { | 461 | { |
462 | char tmp[128]; | 462 | ERR_asprintf_error_data("address=%p offset=%d", address, offset); |
463 | (void) snprintf(tmp, sizeof(tmp), "address=%p offset=%d", | ||
464 | address, offset); | ||
465 | ERR_add_error_data(1, tmp); | ||
466 | } | 463 | } |
467 | 464 | ||
468 | int | 465 | int |