]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
testlibrbd: NUL-terminate orig_data
authorJosh Durgin <josh.durgin@dreamhost.com>
Tue, 9 Aug 2011 21:19:10 +0000 (14:19 -0700)
committerSage Weil <sage@newdream.net>
Thu, 11 Aug 2011 17:06:04 +0000 (10:06 -0700)
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/testlibrbd.c

index 533aeaee5f0145cca4d30ae7305de7af9880469f..5fe0bf61d933d179aaa4be634b176469c7ddeb28 100644 (file)
@@ -267,6 +267,7 @@ void test_io_to_snapshot(rados_ioctx_t io_ctx, rbd_image_t image, size_t isize)
   for (i = 0; i < TEST_IO_TO_SNAP_SIZE - 1; ++i)
     test_data[i] = (char) (i + 48);
   test_data[TEST_IO_TO_SNAP_SIZE] = '\0';
+  orig_data[TEST_IO_TO_SNAP_SIZE] = '\0';
 
   r = rbd_read(image, 0, TEST_IO_TO_SNAP_SIZE, orig_data);
   assert(r == TEST_IO_TO_SNAP_SIZE);