[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] various bugfixes and updates
Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/common
Modified Files:
log.c tortls.c
Log Message:
various bugfixes and updates
redo all the config files for the new format (we'll redo them again soon)
fix (another! yuck) segfault in log_fn when input is too large
tor_tls_context_new() returns -1 for error, not NULL
fix segfault in check_conn_marked() on conn's that die during tls handshake
make ORs also initialize conn from router when we're the receiving node
make non-dirserver ORs upload descriptor to every dirserver on startup
add our local address to the descriptor
add Content-Length field to POST command
revert the Content-Length search in fetch_from_buf_http() to previous code
fix segfault in memmove in fetch_from_buf_http()
raise maximum allowed headers/body size in directory.c
Index: log.c
===================================================================
RCS file: /home/or/cvsroot/src/common/log.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- log.c 19 Sep 2003 09:30:34 -0000 1.13
+++ log.c 25 Sep 2003 10:41:59 -0000 1.14
@@ -54,17 +54,19 @@
".%.3ld [%s] ",
(long)now.tv_usec / 1000, sev_to_string(severity));
if(n > buf_len)
- n = buf_len; /* the *nprintf funcs return how many bytes they
- * _would_ print, if the output is truncated */
+ n = buf_len-1; /* the *nprintf funcs return how many bytes they
+ * _would_ print, if the output is truncated.
+ * Subtract one because the count doesn't include the \0 */
+
if (funcname) {
n += snprintf(buf+n, buf_len-n, "%s(): ", funcname);
if(n > buf_len)
- n = buf_len;
+ n = buf_len-1;
}
n += vsnprintf(buf+n,buf_len-n,format,ap);
if(n > buf_len)
- n = buf_len;
+ n = buf_len-1;
buf[n]='\n';
buf[n+1]='\0';
}
Index: tortls.c
===================================================================
RCS file: /home/or/cvsroot/src/common/tortls.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- tortls.c 25 Sep 2003 05:17:10 -0000 1.14
+++ tortls.c 25 Sep 2003 10:41:59 -0000 1.15
@@ -215,7 +215,7 @@
cert = tor_tls_create_certificate(rsa, nickname);
if (!cert) {
log(LOG_ERR, "Error creating certificate");
- return NULL;
+ return -1;
}
}