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/engine/eng_list.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/engine/eng_list.c')
-rw-r--r-- | src/lib/libcrypto/engine/eng_list.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/engine/eng_list.c b/src/lib/libcrypto/engine/eng_list.c index 95c858960b..5528b5478f 100644 --- a/src/lib/libcrypto/engine/eng_list.c +++ b/src/lib/libcrypto/engine/eng_list.c | |||
@@ -389,7 +389,7 @@ ENGINE *ENGINE_by_id(const char *id) | |||
389 | { | 389 | { |
390 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, | 390 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, |
391 | ENGINE_R_NO_SUCH_ENGINE); | 391 | ENGINE_R_NO_SUCH_ENGINE); |
392 | ERR_add_error_data(2, "id=", id); | 392 | ERR_asprintf_error_data("id=%s", id); |
393 | } | 393 | } |
394 | return iterator; | 394 | return iterator; |
395 | #else | 395 | #else |
@@ -416,7 +416,7 @@ ENGINE *ENGINE_by_id(const char *id) | |||
416 | notfound: | 416 | notfound: |
417 | ENGINE_free(iterator); | 417 | ENGINE_free(iterator); |
418 | ENGINEerr(ENGINE_F_ENGINE_BY_ID,ENGINE_R_NO_SUCH_ENGINE); | 418 | ENGINEerr(ENGINE_F_ENGINE_BY_ID,ENGINE_R_NO_SUCH_ENGINE); |
419 | ERR_add_error_data(2, "id=", id); | 419 | ERR_asprintf_error_data("id=%s", id); |
420 | return NULL; | 420 | return NULL; |
421 | /* EEK! Experimental code ends */ | 421 | /* EEK! Experimental code ends */ |
422 | #endif | 422 | #endif |