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/pem | |
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/pem')
-rw-r--r-- | src/lib/libcrypto/pem/pem_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, | |||
289 | if (!PEM_read_bio(bp, &nm, &header, &data, &len)) { | 289 | if (!PEM_read_bio(bp, &nm, &header, &data, &len)) { |
290 | if (ERR_GET_REASON(ERR_peek_error()) == | 290 | if (ERR_GET_REASON(ERR_peek_error()) == |
291 | PEM_R_NO_START_LINE) | 291 | PEM_R_NO_START_LINE) |
292 | ERR_add_error_data(2, "Expecting: ", name); | 292 | ERR_asprintf_error_data("Expecting: %s", name); |
293 | return 0; | 293 | return 0; |
294 | } | 294 | } |
295 | if (check_pem(nm, name)) | 295 | if (check_pem(nm, name)) |