Index: d1_both.c
===================================================================
RCS file: /v/openssl/cvs/openssl/ssl/d1_both.c,v
retrieving revision 1.31
diff -c -r1.31 d1_both.c
*** d1_both.c	3 May 2010 13:01:40 -0000	1.31
--- d1_both.c	1 Apr 2011 00:56:06 -0000
***************
*** 133,146 ****
  				long ii; \
  				bitmask[((start) >> 3)] |= bitmask_start_values[((start) & 7)]; \
  				for (ii = (((start) >> 3) + 1); ii < ((((end) - 1)) >> 3); ii++) bitmask[ii] = 0xff; \
! 				bitmask[(((end) - 1) >> 3)] |= bitmask_end_values[((end) & 7)]; \
  			} }
  
  #define RSMBLY_BITMASK_IS_COMPLETE(bitmask, msg_len, is_complete) { \
  			long ii; \
  			OPENSSL_assert((msg_len) > 0); \
  			is_complete = 1; \
! 			if (bitmask[(((msg_len) - 1) >> 3)] != bitmask_end_values[((msg_len) & 7)]) is_complete = 0; \
  			if (is_complete) for (ii = (((msg_len) - 1) >> 3) - 1; ii >= 0 ; ii--) \
  				if (bitmask[ii] != 0xff) { is_complete = 0; break; } }
  
--- 133,146 ----
  				long ii; \
  				bitmask[((start) >> 3)] |= bitmask_start_values[((start) & 7)]; \
  				for (ii = (((start) >> 3) + 1); ii < ((((end) - 1)) >> 3); ii++) bitmask[ii] = 0xff; \
! 				bitmask[(((end) - 1) >> 3)] |= bitmask_end_values[(((end) - 1) & 7)]; \
  			} }
  
  #define RSMBLY_BITMASK_IS_COMPLETE(bitmask, msg_len, is_complete) { \
  			long ii; \
  			OPENSSL_assert((msg_len) > 0); \
  			is_complete = 1; \
! 			if (bitmask[(((msg_len) - 1) >> 3)] != bitmask_end_values[(((msg_len) - 1) & 7)]) is_complete = 0; \
  			if (is_complete) for (ii = (((msg_len) - 1) >> 3) - 1; ii >= 0 ; ii--) \
  				if (bitmask[ii] != 0xff) { is_complete = 0; break; } }
  
***************
*** 153,159 ****
  #endif
  
  static unsigned char bitmask_start_values[] = {0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80};
! static unsigned char bitmask_end_values[]   = {0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f};
  
  /* XDTLS:  figure out the right values */
  static unsigned int g_probable_mtu[] = {1500 - 28, 512 - 28, 256 - 28};
--- 153,159 ----
  #endif
  
  static unsigned char bitmask_start_values[] = {0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80};
! static unsigned char bitmask_end_values[]   = {0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff};
  
  /* XDTLS:  figure out the right values */
  static unsigned int g_probable_mtu[] = {1500 - 28, 512 - 28, 256 - 28};
