1
0
Fork 0
mirror of https://github.com/yuzu-emu/mbedtls.git synced 2025-03-23 21:45:15 +00:00

Fix sloppy wording around stricly less-than vs less or equal

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2021-03-01 11:39:21 +01:00
parent 51917a82e8
commit f02eeb8762
2 changed files with 4 additions and 4 deletions
include/mbedtls
library

View file

@ -221,7 +221,7 @@ int mbedtls_net_send( void *ctx, const unsigned char *buf, size_t len );
*
* \note The current implementation of this function uses
* select() and returns an error if the file descriptor
* is beyond \c FD_SETSIZE.
* is \c FD_SETSIZE or greater.
*
* \param ctx Socket
* \param buf The buffer to write to

View file

@ -536,9 +536,9 @@ int mbedtls_net_recv_timeout( void *ctx, unsigned char *buf, size_t len,
return( MBEDTLS_ERR_NET_INVALID_CONTEXT );
/* A limitation of select() is that it only works with file descriptors
* up to FD_SETSIZE. This is a limitation of the fd_set type. Error out
* early, because attempting to call FD_SET on a large file descriptor
* is a buffer overflow on typical platforms. */
* that are strictly less than FD_SETSIZE. This is a limitation of the
* fd_set type. Error out early, because attempting to call FD_SET on a
* large file descriptor is a buffer overflow on typical platforms. */
if( fd >= FD_SETSIZE )
return( MBEDTLS_ERR_NET_RECV_FAILED );