mirror of
https://github.com/openssl/openssl.git
synced 2025-01-12 13:36:28 +08:00
2de7e1d698
When writing to a blocking quic stream, we sometimes get duplicate transmitted data. This occurs when a call to quic_write_blocking has to wait for space to become available in the ring buffer. When we do a wait, the call sets *written to the value returned in args.total_written as filled out by the calls to block_until_pred->quic_write_again. However, the value there is based on the amount we requested, which is only the remaining data that we didn't append in xso_sstream_write. So if we call quic_write_blocking with a buffer of length X, and initially append Y bytes, and write the remainig X-Y bytes via a block_until_pred call, then *written will return with the value X-Y, even though we wrote the full X bytes to the ring buffer. Fix it by recording the initial amount appended into *written, and then add the args.total_written value if we have to wait on more space Fixes openssl/project#924 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/26023) |
||
---|---|---|
.. | ||
build.info | ||
cc_newreno.c | ||
json_enc.c | ||
qlog_event_helpers.c | ||
qlog.c | ||
quic_ackm.c | ||
quic_cfq.c | ||
quic_channel_local.h | ||
quic_channel.c | ||
quic_demux.c | ||
quic_engine_local.h | ||
quic_engine.c | ||
quic_fc.c | ||
quic_fifd.c | ||
quic_impl.c | ||
quic_lcidm.c | ||
quic_local.h | ||
quic_method.c | ||
quic_port_local.h | ||
quic_port.c | ||
quic_rcidm.c | ||
quic_reactor.c | ||
quic_record_rx.c | ||
quic_record_shared.c | ||
quic_record_shared.h | ||
quic_record_tx.c | ||
quic_record_util.c | ||
quic_rstream.c | ||
quic_rx_depack.c | ||
quic_sf_list.c | ||
quic_srt_gen.c | ||
quic_srtm.c | ||
quic_sstream.c | ||
quic_statm.c | ||
quic_stream_map.c | ||
quic_thread_assist.c | ||
quic_tls.c | ||
quic_trace.c | ||
quic_tserver.c | ||
quic_txp.c | ||
quic_txpim.c | ||
quic_types.c | ||
quic_wire_pkt.c | ||
quic_wire.c | ||
uint_set.c |