summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-05-16 16:18:19 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-05-16 16:18:19 +0000
commit8d932f6fd7df8a622f3cb998dab1529247158706 (patch)
tree0b9e0c09f30a0e3dccbd5c6c2314e56ee87b63da /ssl
parent48fd490c6d3c0e5dcfb2f2464ce84adb6bc3ec7e (diff)
Update from 1.0.0-stable
Diffstat (limited to 'ssl')
-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 b53e07d23c..a89edbc7a7 100644
--- a/ssl/d1_pkt.c
+++ b/ssl/d1_pkt.c
@@ -207,6 +207,10 @@ dtls1_buffer_record(SSL *s, record_pqueue *queue, unsigned char *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)