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/pem/pem_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/libcrypto/pem/pem_lib.c') diff --git a/src/lib/libcrypto/pem/pem_lib.c b/src/lib/libcrypto/pem/pem_lib.c index c670ac2acb..9bc2b27285 100644 --- a/src/lib/libcrypto/pem/pem_lib.c +++ b/src/lib/libcrypto/pem/pem_lib.c @@ -289,7 +289,7 @@ PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, if (!PEM_read_bio(bp, &nm, &header, &data, &len)) { if (ERR_GET_REASON(ERR_peek_error()) == PEM_R_NO_START_LINE) - ERR_add_error_data(2, "Expecting: ", name); + ERR_asprintf_error_data("Expecting: %s", name); return 0; } if (check_pem(nm, name)) -- cgit v1.2.3-55-g6feb