Re: [openssl.org #2230] Resolved: [PATCH] DTLS reassembly

2010-04-26 Thread Robin Seggelmann via RT
On Apr 24, 2010, at 6:36 PM, Daniel Mentz via RT wrote: > Robin Seggelmann via RT wrote: >> #define RSMBLY_BITMASK_IS_COMPLETE(bitmask, msg_len, is_complete) { \ > >> +if (is_complete) for (ii = (((msg_len) - 1) >> 3) - 1; >> ii > 0 ; ii--) \ > > I'm wondering if there are

Re: [openssl.org #2230] Resolved: [PATCH] DTLS reassembly

2010-04-24 Thread Daniel Mentz via RT
Robin Seggelmann via RT wrote: > #define RSMBLY_BITMASK_IS_COMPLETE(bitmask, msg_len, is_complete) { \ > + if (is_complete) for (ii = (((msg_len) - 1) >> 3) - 1; > ii > 0 ; ii--) \ I'm wondering if there are two issues with this for loop: 1. It fails to check if bitmask[0]

Re: [openssl.org #2230] Resolved: [PATCH] DTLS reassembly

2010-04-24 Thread Daniel Mentz via RT
Robin Seggelmann via RT wrote: > + for (ii = (((start) >> 3) + 1); ii < (((end - > 1)) >> 3); ii++) bitmask[ii] = 0xff; \ I guess there's a minor mistake: I recommend to replace (((end - 1)) >> 3) with (((end) - 1) >> 3) -Daniel _

Re: [openssl.org #2230] Resolved: [PATCH] DTLS reassembly

2010-04-21 Thread Robin Seggelmann via RT
There is still a bug in the bitmask macros, reported by Daniel Mentz. While checking if the message is complete a read might occur beyond the bitmask array. This is fixed with this patch and the check is now also done backwards which should be faster usually. Regards, Robin --- ssl/d1_both.c