aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-05-19 19:28:24 +0000
committerNick Mathewson <nickm@torproject.org>2004-05-19 19:28:24 +0000
commitba14428d664e3877d29e74087f326620146a15cb (patch)
tree8c4caacaae4414e841161f16d78b80b52e150b7d /src
parent1cfac90984032b889a623f81e45014da4f985435 (diff)
downloadtor-ba14428d664e3877d29e74087f326620146a15cb.tar
tor-ba14428d664e3877d29e74087f326620146a15cb.tar.gz
Fix segfault
svn:r1895
Diffstat (limited to 'src')
-rw-r--r--src/or/buffers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c
index 8acab16a6..a67f47bee 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -94,9 +94,9 @@ static INLINE void buf_remove_from_front(buf_t *buf, size_t n) {
/** Make sure that the memory in buf ends with a zero byte. */
static INLINE int buf_nul_terminate(buf_t *buf)
{
- if (buf_ensure_capacity(buf,buf->len+1)<0)
+ if (buf_ensure_capacity(buf,buf->datalen+1)<0)
return -1;
- buf->mem[buf->len] = '\0';
+ buf->mem[buf->datalen] = '\0';
return 0;
}