Delays the queue insertion until after the ssl3_setup_buffers() call due to use-after-free bug. PR#3362
This commit is contained in:
parent
f87c6a551e
commit
8343e6b6b2
15
ssl/d1_pkt.c
15
ssl/d1_pkt.c
@ -231,13 +231,6 @@ dtls1_buffer_record(SSL *s, record_pqueue *queue, unsigned char *priority)
|
||||
|
||||
item->data = rdata;
|
||||
|
||||
/* insert should not fail, since duplicates are dropped */
|
||||
if (pqueue_insert(queue->q, item) == NULL)
|
||||
{
|
||||
OPENSSL_free(rdata);
|
||||
pitem_free(item);
|
||||
return(0);
|
||||
}
|
||||
|
||||
s->packet = NULL;
|
||||
s->packet_length = 0;
|
||||
@ -251,6 +244,14 @@ dtls1_buffer_record(SSL *s, record_pqueue *queue, unsigned char *priority)
|
||||
pitem_free(item);
|
||||
return(0);
|
||||
}
|
||||
|
||||
/* insert should not fail, since duplicates are dropped */
|
||||
if (pqueue_insert(queue->q, item) == NULL)
|
||||
{
|
||||
OPENSSL_free(rdata);
|
||||
pitem_free(item);
|
||||
return(0);
|
||||
}
|
||||
|
||||
return(1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user