From 8d932f6fd7df8a622f3cb998dab1529247158706 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Sat, 16 May 2009 16:18:19 +0000 Subject: Update from 1.0.0-stable --- ssl/d1_pkt.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ssl') 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) -- cgit v1.2.3