Markus Westerlind
fbe143b142
fix: Prevent undefined behaviour from malicious AsyncRead impl ( #2030 )
...
`AsyncRead` is safe to implement but can be implemented so that it
reports that it read more bytes than it actually did. `poll_read_buf` on
the other head implicitly trusts that the returned length is actually
correct which makes it possible to advance the buffer past what has
actually been initialized.
An alternative fix could be to avoid the panic and instead advance by
`n.min(b.len())`
2020-01-21 10:35:13 -08:00
Markus Westerlind
930679587a
codec: Remove Unpin requirement from Framed[Read,Write,] ( #1758 )
...
cc #1252
2019-11-15 16:30:07 +09:00
Markus Westerlind
34e388619f
timer: delay_for should use tokio_timer::clock::now ( #1572 )
2019-09-19 11:20:18 -07:00
Markus Westerlind
40c77bd17e
signal: Version 0.2
2018-09-10 11:30:04 -07:00
Markus Westerlind
31b51004f2
signal: Increase number of signals to 33 for the sake of FreeBSD
...
Fixes alexcrichton/tokio-signal#21
2018-09-10 11:30:04 -07:00
Markus Westerlind
9a4e4f2308
signal: Don't use the depreceated new method of Registration
2018-09-10 11:30:04 -07:00
Markus Westerlind
484fda7a23
signal: Add an appveyor build file
...
It is not possible to test much on windows but this will at least verify
that it can be built
2018-09-10 11:30:04 -07:00
Markus Westerlind
45ba6e2652
signal: Remove test that were accidentally included in the ctrl-c example
2018-09-10 11:30:04 -07:00
Markus Westerlind
e73b8a0cc9
signal: refactor: Prefer the implicit handle passing used by tokio
2018-09-10 11:30:03 -07:00
Markus Westerlind
209232befd
signal: Ensure that the driver dies once the signal does
...
`tokio::run` expects that all futures finish processing so we can't
leave `Driver` around forever or `tokio::run` would never return.
2018-09-10 11:30:03 -07:00
Markus Westerlind
f759e4d70f
signal: panic
2018-09-10 11:30:03 -07:00
Markus Westerlind
1fdff707b8
signal: test: Add a test for ctrl_c on unix
2018-09-10 11:30:03 -07:00
Markus Westerlind
e97e8cb7fe
signal: Update the windows implementation to work with tokio
...
BREAKING CHANGE
`ctrl_c` now takes a `tokio_reactor::Handle`
2018-09-10 11:30:03 -07:00
Markus Westerlind
2848df9b6c
signal: Run rustfmt 0.4.2
2018-09-10 11:30:03 -07:00