There is a redundant check at the beginning of ssl3_read_bytes (in 
ssl/s3_pkt.c) for a non-zero value of the "type" parameter.  This is not 
incorrect, but it is unnecessary.  (Patch attached)

diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index 33286b8..351c737 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -1053,7 +1053,7 @@ int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, 
int len, int peek)
                if (!ssl3_setup_read_buffer(s))
                        return(-1);
 
-       if ((type && (type != SSL3_RT_APPLICATION_DATA) && (type != 
SSL3_RT_HANDSHAKE) && type) ||
+       if ((type && (type != SSL3_RT_APPLICATION_DATA) && (type != 
SSL3_RT_HANDSHAKE)) ||
            (peek && (type != SSL3_RT_APPLICATION_DATA)))
                {
                SSLerr(SSL_F_SSL3_READ_BYTES, ERR_R_INTERNAL_ERROR);

Reply via email to