summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorsimon <simon@FreeBSD.org>2009-08-23 13:58:25 +0000
committersimon <simon@FreeBSD.org>2009-08-23 13:58:25 +0000
commit649055c02feaee53627a00c96e97ce7369c14782 (patch)
tree603d4d8f49dabe92b27a4a916cf2ed99f495b99d /crypto
parentd5528ae65fadeed6bcb5c766bf12ed4b275a9271 (diff)
downloadFreeBSD-src-649055c02feaee53627a00c96e97ce7369c14782.zip
FreeBSD-src-649055c02feaee53627a00c96e97ce7369c14782.tar.gz
Import DTLS fix from upstream OpenSSL 0.9.8 branch:
Fix memory consumption bug with "future epoch" DTLS records. Note that this will not get FreeBSD Security Advisory as DTLS is experimental in OpenSSL. Security: CVE-2009-1377 Obtained from: OpenSSL CVS http://cvs.openssl.org/chngview?cn=18187
Diffstat (limited to 'crypto')
-rw-r--r--crypto/pqueue/pqueue.c14
-rw-r--r--crypto/pqueue/pqueue.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/crypto/pqueue/pqueue.c b/crypto/pqueue/pqueue.c
index 5cc1852..6c89f06 100644
--- a/crypto/pqueue/pqueue.c
+++ b/crypto/pqueue/pqueue.c
@@ -234,3 +234,17 @@ pqueue_next(pitem **item)
return ret;
}
+
+int
+pqueue_size(pqueue_s *pq)
+{
+ pitem *item = pq->items;
+ int count = 0;
+
+ while(item != NULL)
+ {
+ count++;
+ item = item->next;
+ }
+ return count;
+}
diff --git a/crypto/pqueue/pqueue.h b/crypto/pqueue/pqueue.h
index 02386d1..16c4072 100644
--- a/crypto/pqueue/pqueue.h
+++ b/crypto/pqueue/pqueue.h
@@ -91,5 +91,6 @@ pitem *pqueue_iterator(pqueue pq);
pitem *pqueue_next(piterator *iter);
void pqueue_print(pqueue pq);
+int pqueue_size(pqueue pq);
#endif /* ! HEADER_PQUEUE_H */
OpenPOWER on IntegriCloud