diff options
author | Roger Dingledine <arma@torproject.org> | 2004-03-31 05:10:34 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-03-31 05:10:34 +0000 |
commit | b4a61d1ab15174470a2ff8737125848d4d3abf4a (patch) | |
tree | 0e234dbc82080de6bb0c120f15a0fe4c53411134 /src/or/directory.c | |
parent | 87dbd36a3ce153ef10676bf63a126e58573afd93 (diff) | |
download | tor-b4a61d1ab15174470a2ff8737125848d4d3abf4a.tar.gz tor-b4a61d1ab15174470a2ff8737125848d4d3abf4a.zip |
better way: always nul-terminate. then sometimes use it, sometimes not.
svn:r1408
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index ff565369ca..b83351beb1 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -211,8 +211,6 @@ int connection_dir_process_inbuf(connection_t *conn) { if(conn->purpose == DIR_PURPOSE_FETCH_DIR) { /* fetch/process the directory to learn about new routers. */ - directory[dir_len] = 0; /* null terminate it, we can do this - because fetch_from_buf_http made space */ log_fn(LOG_INFO,"Received directory (size %d):\n%s", dir_len, directory); if(status_code == 503 || dir_len == 0) { log_fn(LOG_INFO,"Empty directory. Ignoring."); @@ -374,7 +372,6 @@ static int directory_handle_command_post(connection_t *conn, } if(!strcmp(url,"/")) { /* server descriptor post */ - body[body_len] = 0; /* dirserv_add_descriptor expects nul-terminated */ cp = body; switch(dirserv_add_descriptor(&cp)) { case -1: |