summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-04-10 18:27:11 +1000
committerteor <teor@torproject.org>2019-04-10 18:27:11 +1000
commita1d9f44971f2442a41a4d5fbed5aba28d872e15b (patch)
treed4f9c0979ff114fe30d76f05ff3cb9e2e79c5b38 /src/core
parentc28cdcc9bf5df9ed6479881a1fc4124a7b7a2676 (diff)
parent454bdb22eeb4637a8bb5e40deb8454311f4ba4a2 (diff)
downloadtor-a1d9f44971f2442a41a4d5fbed5aba28d872e15b.tar.gz
tor-a1d9f44971f2442a41a4d5fbed5aba28d872e15b.zip
Merge branch 'maint-0.4.0'
Diffstat (limited to 'src/core')
-rw-r--r--src/core/mainloop/connection.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c
index a56e7f9e0a..51c19b4c4c 100644
--- a/src/core/mainloop/connection.c
+++ b/src/core/mainloop/connection.c
@@ -3789,6 +3789,10 @@ connection_buf_read_from_socket(connection_t *conn, ssize_t *max_to_read,
if (conn->linked_conn) {
result = buf_move_to_buf(conn->inbuf, conn->linked_conn->outbuf,
&conn->linked_conn->outbuf_flushlen);
+ if (BUG(result<0)) {
+ log_warn(LD_BUG, "reading from linked connection buffer failed.");
+ return -1;
+ }
} else {
result = 0;
}