Correct type of RECORD_LAYER_get_rrec_length()
authorMatt Caswell <matt@openssl.org>
Tue, 2 Jun 2015 07:57:02 +0000 (08:57 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 10 Jun 2015 11:06:29 +0000 (12:06 +0100)
The underlying field returned by RECORD_LAYER_get_rrec_length() is an
unsigned int. The return type of the function should match that.

Reviewed-by: Tim Hudson <tjh@openssl.org>
ssl/record/rec_layer_s3.c
ssl/record/record.h

index 47a021d6874e679f7e43c6cec8a36f4d695f04a3..79d3c21fbe8a88f4d41512876b4260251e6bcd9a 100644 (file)
@@ -1504,7 +1504,7 @@ int RECORD_LAYER_is_sslv2_record(RECORD_LAYER *rl)
 /*
  * Returns the length in bytes of the current rrec
  */
-int RECORD_LAYER_get_rrec_length(RECORD_LAYER *rl)
+unsigned int RECORD_LAYER_get_rrec_length(RECORD_LAYER *rl)
 {
     return SSL3_RECORD_get_length(&rl->rrec);
 }
index cf1607ccb49ec74a1251086ef53eda492ab7abfa..6931bb4712d310fd13ff03886c310fd26da9f8a2 100644 (file)
@@ -326,7 +326,7 @@ void RECORD_LAYER_reset_read_sequence(RECORD_LAYER *rl);
 void RECORD_LAYER_reset_write_sequence(RECORD_LAYER *rl);
 int RECORD_LAYER_setup_comp_buffer(RECORD_LAYER *rl);
 int RECORD_LAYER_is_sslv2_record(RECORD_LAYER *rl);
-int RECORD_LAYER_get_rrec_length(RECORD_LAYER *rl);
+unsigned int RECORD_LAYER_get_rrec_length(RECORD_LAYER *rl);
 __owur int ssl3_pending(const SSL *s);
 __owur int ssl3_write_bytes(SSL *s, int type, const void *buf, int len);
 __owur int do_ssl3_write(SSL *s, int type, const unsigned char *buf,