From 47bb6e76785f0b1c4d19d8d0a02f3eb3813f96e2 Mon Sep 17 00:00:00 2001 From: beck <> Date: Sat, 26 Apr 2014 18:56:38 +0000 Subject: 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@ --- src/lib/libcrypto/engine/eng_list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/libcrypto/engine/eng_list.c') 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) { ENGINEerr(ENGINE_F_ENGINE_BY_ID, ENGINE_R_NO_SUCH_ENGINE); - ERR_add_error_data(2, "id=", id); + ERR_asprintf_error_data("id=%s", id); } return iterator; #else @@ -416,7 +416,7 @@ ENGINE *ENGINE_by_id(const char *id) notfound: ENGINE_free(iterator); ENGINEerr(ENGINE_F_ENGINE_BY_ID,ENGINE_R_NO_SUCH_ENGINE); - ERR_add_error_data(2, "id=", id); + ERR_asprintf_error_data("id=%s", id); return NULL; /* EEK! Experimental code ends */ #endif -- cgit v1.2.3-55-g6feb