diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-07-30 14:27:29 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-07-30 14:27:29 -0400 |
commit | 69d775293714f3fdb582f7877191ade48f8f8124 (patch) | |
tree | 52a1a91f923615bc2d06f4ffa65364e0ff655a09 /src/lib/buf/buffers.c | |
parent | 3b8bf743ae6eca261dd46cde94371a4cca0c0689 (diff) | |
parent | c2d5ec5e43c2690656ea5a5a384683108782d149 (diff) | |
download | tor-69d775293714f3fdb582f7877191ade48f8f8124.tar.gz tor-69d775293714f3fdb582f7877191ade48f8f8124.zip |
Merge branch 'bug40076_042' into bug40076_043
Diffstat (limited to 'src/lib/buf/buffers.c')
-rw-r--r-- | src/lib/buf/buffers.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/buf/buffers.c b/src/lib/buf/buffers.c index 09a074edcc..d7b73e3807 100644 --- a/src/lib/buf/buffers.c +++ b/src/lib/buf/buffers.c @@ -692,6 +692,8 @@ buf_move_all(buf_t *buf_out, buf_t *buf_in) tor_assert(buf_out); if (!buf_in) return; + if (buf_datalen(buf_in) == 0) + return; if (BUG(buf_out->datalen >= INT_MAX || buf_in->datalen >= INT_MAX)) return; if (BUG(buf_out->datalen >= INT_MAX - buf_in->datalen)) |