1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03: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 e28f236b6b
commit c8dab5b41e
2 changed files with 8 additions and 8 deletions

View File

@ -466,9 +466,9 @@ int mbedtls_net_poll( mbedtls_net_context *ctx, uint32_t rw, uint32_t timeout )
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_POLL_FAILED );
@ -592,9 +592,9 @@ int mbedtls_net_recv_timeout( void *ctx, unsigned char *buf,
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_POLL_FAILED );