diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-07-30 14:24:25 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-07-30 14:24:25 -0400 |
commit | c4742b89b23d58958ee0d5ca324dac5948c94bf6 (patch) | |
tree | f403e603d110b8a2f986051d45f240c17eb43e8a /src/test/test_buffers.c | |
parent | 0a588821cb5540e901a3d5b07ac73a20905a2c64 (diff) | |
download | tor-c4742b89b23d58958ee0d5ca324dac5948c94bf6.tar.gz tor-c4742b89b23d58958ee0d5ca324dac5948c94bf6.zip |
Fix a bug in buf_move_all() when the input buffer is empty.
We found this in #40076, after we started using buf_move_all() in
more places. Fixes bug #40076; bugfix on 0.3.3.1-alpha. As far as
I know, the crash only affects master, but I think this warrants a
backport, "just in case".
Diffstat (limited to 'src/test/test_buffers.c')
-rw-r--r-- | src/test/test_buffers.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/test/test_buffers.c b/src/test/test_buffers.c index 67a49a5017..3e7364a5c8 100644 --- a/src/test/test_buffers.c +++ b/src/test/test_buffers.c @@ -310,7 +310,6 @@ test_buffers_move_all(void *arg) buf_t *output = buf_new(); char *s = NULL; -#if 0 /* Move from empty buffer to nonempty buffer. (This is a regression test for * #40076) */ buf_add(output, "abc", 3); @@ -329,7 +328,6 @@ test_buffers_move_all(void *arg) /* Move from empty to empty. */ output = buf_new(); input = buf_new(); -#endif buf_move_all(output, input); buf_assert_ok(input); buf_assert_ok(output); |