Ver código fonte

Fix the test async_bio in datagram mode.

write_quota should only be decremented by 1 in datagram mode, otherwise we'll
underflow and always allow writes through. This does not cause any existing
tests to fail.

(It will be useful once the bug in dtls1_do_write is fixed.)

Change-Id: I42aa001d7264790a3726269890635f679497fb1c
Reviewed-on: https://boringssl-review.googlesource.com/2831
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 9 anos atrás
committed by Adam Langley
pai
commit
af19de3101
1 arquivos alterados com 1 adições e 1 exclusões
  1. +1
    -1
      ssl/test/async_bio.cc

+ 1
- 1
ssl/test/async_bio.cc Ver arquivo

@@ -61,7 +61,7 @@ static int async_write(BIO *bio, const char *in, int inl) {
if (ret <= 0) {
BIO_copy_next_retry(bio);
} else {
a->write_quota -= ret;
a->write_quota -= (a->datagram ? 1 : ret);
}
return ret;
}


Carregando…
Cancelar
Salvar