[or-cvs] r14567: Log correct openssl buf capacity when using my sooper sekrit (in tor/trunk: . src/common)
nickm at seul.org
nickm at seul.org
Mon May 5 23:57:18 UTC 2008
Author: nickm
Date: 2008-05-05 19:57:17 -0400 (Mon, 05 May 2008)
New Revision: 14567
Modified:
tor/trunk/
tor/trunk/src/common/tortls.c
Log:
r19613 at catbus: nickm | 2008-05-05 19:57:06 -0400
Log correct openssl buf capacity when using my sooper sekrit buffer hack. This will help test the aforementioned ssbh.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r19613] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/common/tortls.c
===================================================================
--- tor/trunk/src/common/tortls.c 2008-05-05 12:14:10 UTC (rev 14566)
+++ tor/trunk/src/common/tortls.c 2008-05-05 23:57:17 UTC (rev 14567)
@@ -1352,8 +1352,14 @@
int *rbuf_capacity, int *rbuf_bytes,
int *wbuf_capacity, int *wbuf_bytes)
{
- *rbuf_capacity = tls->ssl->s3->rbuf.len;
- *wbuf_capacity = tls->ssl->s3->wbuf.len;
+ if (tls->ssl->s3->rbuf.buf)
+ *rbuf_capacity = tls->ssl->s3->rbuf.len;
+ else
+ *rbuf_capacity = 0;
+ if (tls->ssl->s3->wbuf.buf)
+ *wbuf_capacity = tls->ssl->s3->wbuf.len;
+ else
+ *wbuf_capacity = 0;
*rbuf_bytes = tls->ssl->s3->rbuf.left;
*wbuf_bytes = tls->ssl->s3->wbuf.left;
}
More information about the tor-commits
mailing list