| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| mbedtls.c | ||
| mbedtls.h | ||
| openssl.c | ||
| openssl.h | ||
| registry.c | ||
| registry.h | ||
| socket.c | ||
| socket.h | ||
| stransport.c | ||
| stransport.h | ||
| tls.c | ||
| tls.h |
The mbedtls library uses a callback mechanism to allow downstream users to plug in their own receive and send functions. We implement `bio_read` and `bio_write` functions, which simply wrap the `git_stream_read` and `git_stream_write` functions, respectively. The problem arises due to the return value of the callback functions: mbedtls expects us to return an `int` containing the actual number of bytes that were read or written. But this is in fact completely misdesigned, as callers are allowed to pass in a buffer with length `SIZE_MAX`. We thus may be unable to represent the number of bytes written via the return value. Fix this by only ever reading or writing at most `INT_MAX` bytes.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| mbedtls.c | Loading commit data... | |
| mbedtls.h | Loading commit data... | |
| openssl.c | Loading commit data... | |
| openssl.h | Loading commit data... | |
| registry.c | Loading commit data... | |
| registry.h | Loading commit data... | |
| socket.c | Loading commit data... | |
| socket.h | Loading commit data... | |
| stransport.c | Loading commit data... | |
| stransport.h | Loading commit data... | |
| tls.c | Loading commit data... | |
| tls.h | Loading commit data... |