mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05: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:
		
							parent
							
								
									e28f236b6b
								
							
						
					
					
						commit
						c8dab5b41e
					
				@ -157,7 +157,7 @@ int mbedtls_net_accept( mbedtls_net_context *bind_ctx,
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 * \note           The current implementation of this function uses
 | 
					 * \note           The current implementation of this function uses
 | 
				
			||||||
 *                 select() and returns an error if the file descriptor
 | 
					 *                 select() and returns an error if the file descriptor
 | 
				
			||||||
 *                 is beyond \c FD_SETSIZE.
 | 
					 *                 is \c FD_SETSIZE or greater.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * \param ctx      Socket to check
 | 
					 * \param ctx      Socket to check
 | 
				
			||||||
 * \param rw       Bitflag composed of MBEDTLS_NET_POLL_READ and
 | 
					 * \param rw       Bitflag composed of MBEDTLS_NET_POLL_READ and
 | 
				
			||||||
@ -242,7 +242,7 @@ int mbedtls_net_send( void *ctx, const unsigned char *buf, size_t len );
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 * \note           The current implementation of this function uses
 | 
					 * \note           The current implementation of this function uses
 | 
				
			||||||
 *                 select() and returns an error if the file descriptor
 | 
					 *                 select() and returns an error if the file descriptor
 | 
				
			||||||
 *                 is beyond \c FD_SETSIZE.
 | 
					 *                 is \c FD_SETSIZE or greater.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * \param ctx      Socket
 | 
					 * \param ctx      Socket
 | 
				
			||||||
 * \param buf      The buffer to write to
 | 
					 * \param buf      The buffer to write to
 | 
				
			||||||
 | 
				
			|||||||
@ -466,9 +466,9 @@ int mbedtls_net_poll( mbedtls_net_context *ctx, uint32_t rw, uint32_t timeout )
 | 
				
			|||||||
        return( MBEDTLS_ERR_NET_INVALID_CONTEXT );
 | 
					        return( MBEDTLS_ERR_NET_INVALID_CONTEXT );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* A limitation of select() is that it only works with file descriptors
 | 
					    /* 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
 | 
					     * that are strictly less than FD_SETSIZE. This is a limitation of the
 | 
				
			||||||
     * early, because attempting to call FD_SET on a large file descriptor
 | 
					     * fd_set type. Error out early, because attempting to call FD_SET on a
 | 
				
			||||||
     * is a buffer overflow on typical platforms. */
 | 
					     * large file descriptor is a buffer overflow on typical platforms. */
 | 
				
			||||||
    if( fd >= FD_SETSIZE )
 | 
					    if( fd >= FD_SETSIZE )
 | 
				
			||||||
        return( MBEDTLS_ERR_NET_POLL_FAILED );
 | 
					        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 );
 | 
					        return( MBEDTLS_ERR_NET_INVALID_CONTEXT );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* A limitation of select() is that it only works with file descriptors
 | 
					    /* 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
 | 
					     * that are strictly less than FD_SETSIZE. This is a limitation of the
 | 
				
			||||||
     * early, because attempting to call FD_SET on a large file descriptor
 | 
					     * fd_set type. Error out early, because attempting to call FD_SET on a
 | 
				
			||||||
     * is a buffer overflow on typical platforms. */
 | 
					     * large file descriptor is a buffer overflow on typical platforms. */
 | 
				
			||||||
    if( fd >= FD_SETSIZE )
 | 
					    if( fd >= FD_SETSIZE )
 | 
				
			||||||
        return( MBEDTLS_ERR_NET_POLL_FAILED );
 | 
					        return( MBEDTLS_ERR_NET_POLL_FAILED );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user