mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix an underflow in buffer use conting.
svn:r4360
This commit is contained in:
@@ -669,6 +669,7 @@ write_to_buf(const char *string, size_t string_len, buf_t *buf)
|
||||
tor_assert(_buf_end(buf) == buf->mem);
|
||||
memcpy(buf->mem, string+string_len, len2);
|
||||
buf->datalen += len2;
|
||||
buf_total_used += len2;
|
||||
}
|
||||
if (buf->datalen > buf->highwater)
|
||||
buf->highwater = buf->datalen;
|
||||
|
||||
Reference in New Issue
Block a user