diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-05-09 13:20:01 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-05-09 13:20:01 -0400 |
commit | 82ab33c9a66a9c45e9512b698ef203b1aaca7a3d (patch) | |
tree | 22d074c4f7606ccb31a56f43ad5db74233d3d488 /src/test | |
parent | 8f21838ee5305b89c4089a06ca51e95bc89ae053 (diff) | |
parent | bae5dd6c8d4535360d471932b87431f54b515567 (diff) | |
download | tor-82ab33c9a66a9c45e9512b698ef203b1aaca7a3d.tar.gz tor-82ab33c9a66a9c45e9512b698ef203b1aaca7a3d.zip |
Merge remote-tracking branch 'origin/maint-0.2.4'
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/test.c b/src/test/test.c index fe4513c7ee..c0f57d46f5 100644 --- a/src/test/test.c +++ b/src/test/test.c @@ -813,6 +813,18 @@ test_buffers(void) buf_free(buf); buf = NULL; + /* Try adding a string too long for any freelist. */ + { + char *cp = tor_malloc_zero(65536); + buf = buf_new(); + write_to_buf(cp, 65536, buf); + tor_free(cp); + + tt_int_op(buf_datalen(buf), ==, 65536); + buf_free(buf); + buf = NULL; + } + done: if (buf) buf_free(buf); |