summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/crypto/comp
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2014-04-26 18:56:37 +0000
committerbeck <beck@openbsd.org>2014-04-26 18:56:37 +0000
commit0f637b92bc02cf08d6ec14891d27a582cbd971ae (patch)
tree86c57b804d6bfaf4c846d7c286917d8063f541d2 /lib/libssl/src/crypto/comp
parentsync (diff)
downloadwireguard-openbsd-0f637b92bc02cf08d6ec14891d27a582cbd971ae.tar.xz
wireguard-openbsd-0f637b92bc02cf08d6ec14891d27a582cbd971ae.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 'lib/libssl/src/crypto/comp')
-rw-r--r--lib/libssl/src/crypto/comp/c_zlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libssl/src/crypto/comp/c_zlib.c b/lib/libssl/src/crypto/comp/c_zlib.c
index aaf89429b68..3a73b3df0bd 100644
--- a/lib/libssl/src/crypto/comp/c_zlib.c
+++ b/lib/libssl/src/crypto/comp/c_zlib.c
@@ -551,7 +551,7 @@ bio_zlib_read(BIO *b, char *out, int outl)
if ((ret != Z_OK) && (ret != Z_STREAM_END)) {
COMPerr(COMP_F_BIO_ZLIB_READ,
COMP_R_ZLIB_INFLATE_ERROR);
- ERR_add_error_data(2, "zlib error:",
+ ERR_asprintf_error_data("zlib error:%s",
zError(ret));
return 0;
}
@@ -638,7 +638,7 @@ bio_zlib_write(BIO *b, const char *in, int inl)
if (ret != Z_OK) {
COMPerr(COMP_F_BIO_ZLIB_WRITE,
COMP_R_ZLIB_DEFLATE_ERROR);
- ERR_add_error_data(2, "zlib error:", zError(ret));
+ ERR_asprintf_error_data("zlib error:%s", zError(ret));
return 0;
}
ctx->ocount = ctx->obufsize - zout->avail_out;
@@ -688,7 +688,7 @@ bio_zlib_flush(BIO *b)
else if (ret != Z_OK) {
COMPerr(COMP_F_BIO_ZLIB_FLUSH,
COMP_R_ZLIB_DEFLATE_ERROR);
- ERR_add_error_data(2, "zlib error:", zError(ret));
+ ERR_asprintf_error_data("zlib error:%s", zError(ret));
return 0;
}
ctx->ocount = ctx->obufsize - zout->avail_out;