diff options
author | Roger Dingledine <arma@torproject.org> | 2003-12-14 08:15:41 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-12-14 08:15:41 +0000 |
commit | 0ea88d508dbc043f40e5209ad50b75e7b07099d3 (patch) | |
tree | e09076c00fc6a42439f512e5a722911308b92c64 /src/or/buffers.c | |
parent | f9bdb8a0da735caf263a72bdd0db847a78b64b53 (diff) | |
download | tor-0ea88d508dbc043f40e5209ad50b75e7b07099d3.tar.gz tor-0ea88d508dbc043f40e5209ad50b75e7b07099d3.zip |
oops, i broke buffers. fixed.
svn:r931
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r-- | src/or/buffers.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index 2ca05a0fce..d8a0e52583 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -290,9 +290,10 @@ int write_to_buf(const char *string, int string_len, buf_t *buf) { assert(string && BUF_OK(buf)); - if (buf_ensure_capacity(buf, buf->datalen+string_len)) + if (buf_ensure_capacity(buf, buf->datalen+string_len)) { log_fn(LOG_WARN, "buflen too small, can't hold %d bytes.",buf->datalen+string_len); return -1; + } memcpy(buf->mem+buf->datalen, string, string_len); buf->datalen += string_len; |