1 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-1377
5 @@ -167,6 +167,10 @@ dtls1_buffer_record(SSL *s, record_pqueu
6 DTLS1_RECORD_DATA *rdata;
9 + /* Limit the size of the queue to prevent DOS attacks */
10 + if (pqueue_size(queue->q) >= 100)
13 rdata = OPENSSL_malloc(sizeof(DTLS1_RECORD_DATA));
14 item = pitem_new(priority, rdata);
15 if (rdata == NULL || item == NULL)
16 --- a/crypto/pqueue/pqueue.c
17 +++ b/crypto/pqueue/pqueue.c
18 @@ -234,3 +234,17 @@ pqueue_next(pitem **item)
24 +pqueue_size(pqueue_s *pq)
26 + pitem *item = pq->items;
36 --- a/crypto/pqueue/pqueue.h
37 +++ b/crypto/pqueue/pqueue.h
38 @@ -91,5 +91,6 @@ pitem *pqueue_iterator(pqueue pq);
39 pitem *pqueue_next(piterator *iter);
41 void pqueue_print(pqueue pq);
42 +int pqueue_size(pqueue pq);
44 #endif /* ! HEADER_PQUEUE_H */