summaryrefslogtreecommitdiffstats
path: root/ssl/d1_pkt.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-05-16 16:18:45 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-05-16 16:18:45 +0000
commit6bf4ca08404708bd83a56b1982aa6823d2f605f1 (patch)
treea3466ffef3728f47675c2578d45cbef29a0d8b50 /ssl/d1_pkt.c
parentefa59b8d5957a4e632482280355a92766c4f0f77 (diff)
Update from 1.0.0-stable.
Diffstat (limited to 'ssl/d1_pkt.c')
-rw-r--r--ssl/d1_pkt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c
index 3906019023..ec7752d93a 100644
--- a/ssl/d1_pkt.c
+++ b/ssl/d1_pkt.c
@@ -167,6 +167,10 @@ dtls1_buffer_record(SSL *s, record_pqueue *queue, PQ_64BIT priority)
DTLS1_RECORD_DATA *rdata;
pitem *item;
+ /* Limit the size of the queue to prevent DOS attacks */
+ if (pqueue_size(queue->q) >= 100)
+ return 0;
+
rdata = OPENSSL_malloc(sizeof(DTLS1_RECORD_DATA));
item = pitem_new(priority, rdata);
if (rdata == NULL || item == NULL)