1
Index: openssl-0.9.8k/ssl/d1_pkt.c
2
===================================================================
3
--- openssl-0.9.8k.orig/ssl/d1_pkt.c 2008-10-13 08:43:06.000000000 +0200
4
+++ openssl-0.9.8k/ssl/d1_pkt.c 2009-07-19 11:32:41.000000000 +0200
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
Index: openssl-0.9.8k/crypto/pqueue/pqueue.c
17
===================================================================
18
--- openssl-0.9.8k.orig/crypto/pqueue/pqueue.c 2005-06-28 14:53:33.000000000 +0200
19
+++ openssl-0.9.8k/crypto/pqueue/pqueue.c 2009-07-19 11:32:41.000000000 +0200
26
+pqueue_size(pqueue_s *pq)
28
+ pitem *item = pq->items;
38
Index: openssl-0.9.8k/crypto/pqueue/pqueue.h
39
===================================================================
40
--- openssl-0.9.8k.orig/crypto/pqueue/pqueue.h 2005-05-31 00:34:27.000000000 +0200
41
+++ openssl-0.9.8k/crypto/pqueue/pqueue.h 2009-07-19 11:32:41.000000000 +0200
43
pitem *pqueue_next(piterator *iter);
45
void pqueue_print(pqueue pq);
46
+int pqueue_size(pqueue pq);
48
#endif /* ! HEADER_PQUEUE_H */