mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-11-05 08:10:38 +03:00
Fix potential NULL dereference
We document that either of recv or recv_timeout may be NULL, but for TLS we always used recv... Thanks Coverity for catching that. (Not remotely trigerrable: local configuration.) Also made me notice net_recv_timeout didn't do its job properly.
This commit is contained in:
@@ -178,6 +178,7 @@ int mbedtls_net_send( void *ctx, const unsigned char *buf, size_t len );
|
||||
* \param buf The buffer to write to
|
||||
* \param len Maximum length of the buffer
|
||||
* \param timeout Maximum number of milliseconds to wait for data
|
||||
* 0 means no timeout (wait forever)
|
||||
*
|
||||
* \return the number of bytes received,
|
||||
* or a non-zero error code:
|
||||
|
||||
Reference in New Issue
Block a user