diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-07-30 14:35:06 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-07-30 14:35:06 -0400 |
commit | 4c810a6abe8817be07390d1bcbd8f25ef4ad826a (patch) | |
tree | 6fdf958e97880d0def6c4c56be673152879c8d1b /src/lib/buf | |
parent | 155e0dee49ad041707b8bc498d8fb6a82103800b (diff) | |
parent | b4400e2093f68e349464eacd7dbe44cebf8d5c71 (diff) | |
download | tor-4c810a6abe8817be07390d1bcbd8f25ef4ad826a.tar.gz tor-4c810a6abe8817be07390d1bcbd8f25ef4ad826a.zip |
Merge branch '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 aa0af69072..23fc1e23a6 100644 --- a/src/lib/buf/buffers.c +++ b/src/lib/buf/buffers.c @@ -693,6 +693,8 @@ buf_move_all(buf_t *buf_out, buf_t *buf_in) tor_assert(buf_out); if (!buf_in) return 0; + if (buf_datalen(buf_in) == 0) + return 0; if (BUG(buf_out->datalen > BUF_MAX_LEN || buf_in->datalen > BUF_MAX_LEN)) return 0; if (BUG(buf_out->datalen > BUF_MAX_LEN - buf_in->datalen)) |