diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-07-30 14:28:11 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-07-30 14:28:11 -0400 |
commit | b4400e2093f68e349464eacd7dbe44cebf8d5c71 (patch) | |
tree | 62c22500f10259ffaad4c839938f7419cc6cca7d /src/lib/buf | |
parent | 0c8c295963b5389684d3b41e9260f7fbba4dfe2a (diff) | |
parent | 69d775293714f3fdb582f7877191ade48f8f8124 (diff) | |
download | tor-b4400e2093f68e349464eacd7dbe44cebf8d5c71.tar.gz tor-b4400e2093f68e349464eacd7dbe44cebf8d5c71.zip |
Merge branch 'bug40076_043' into bug40076_044
Diffstat (limited to 'src/lib/buf')
-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 95b384bf06..a5031a47a6 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 > BUF_MAX_LEN || buf_in->datalen > BUF_MAX_LEN)) return; if (BUG(buf_out->datalen > BUF_MAX_LEN - buf_in->datalen)) |