diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2018-03-19 14:20:53 +0100 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2018-03-19 14:20:53 +0100 |
commit | c911e5da3c8e09a9531149c95aa92c65ecdf4b99 (patch) | |
tree | 0e8849c1141fddf08429148fc07b83d3ec9ba192 /doc | |
parent | d4ef4fbf46a51837a54e4a7cd0140eb9f08fdf30 (diff) |
Fix bio callback backward compatibility
Don't pass a pointer to uninitialized processed value
for BIO_CB_READ and BIO_CB_WRITE
Check the correct cmd code in BIO_callback_ctrl
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5516)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/man3/BIO_set_callback.pod | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/doc/man3/BIO_set_callback.pod b/doc/man3/BIO_set_callback.pod index 71a041ebf5..0a9b6edb65 100644 --- a/doc/man3/BIO_set_callback.pod +++ b/doc/man3/BIO_set_callback.pod @@ -114,7 +114,7 @@ is called before the free operation. =item B<BIO_read_ex(b, data, dlen, readbytes)> - callback_ex(b, BIO_CB_READ, data, dlen, 0, 0L, 1L, readbytes) + callback_ex(b, BIO_CB_READ, data, dlen, 0, 0L, 1L, NULL) or @@ -123,7 +123,7 @@ or is called before the read and callback_ex(b, BIO_CB_READ | BIO_CB_RETURN, data, dlen, 0, 0L, retvalue, - readbytes) + &readbytes) or @@ -133,7 +133,7 @@ after. =item B<BIO_write(b, data, dlen, written)> - callback_ex(b, BIO_CB_WRITE, data, dlen, 0, 0L, 1L, written) + callback_ex(b, BIO_CB_WRITE, data, dlen, 0, 0L, 1L, NULL) or @@ -142,7 +142,7 @@ or is called before the write and callback_ex(b, BIO_CB_WRITE | BIO_CB_RETURN, data, dlen, 0, 0L, retvalue, - written) + &written) or @@ -161,7 +161,7 @@ or is called before the operation and callback_ex(b, BIO_CB_GETS | BIO_CB_RETURN, buf, size, 0, 0L, retvalue, - readbytes) + &readbytes) or @@ -179,11 +179,11 @@ or is called before the operation and - callback_ex(b, BIO_CB_PUTS | BIO_CB_RETURN, buf, 0, 0, 0L, retvalue, written) + callback_ex(b, BIO_CB_PUTS | BIO_CB_RETURN, buf, 0, 0, 0L, retvalue, &written) or - callback(b, BIO_CB_WRITE|BIO_CB_RETURN, buf, 0, 0L, retvalue) + callback(b, BIO_CB_PUTS|BIO_CB_RETURN, buf, 0, 0L, retvalue) after. @@ -205,6 +205,10 @@ or after. +Note: B<cmd> == B<BIO_CTRL_SET_CALLBACK> is special, because B<parg> is not the +argument of type B<BIO_info_cb> itself. In this case B<parg> is a pointer to +the actual call parameter, see B<BIO_callback_ctrl>. + =back =head1 EXAMPLE |