]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: make diff banner length depend on the banner
authorJosh Durgin <josh.durgin@inktank.com>
Sat, 30 Mar 2013 00:03:59 +0000 (17:03 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Mon, 1 Apr 2013 15:56:06 +0000 (08:56 -0700)
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/rbd.cc

index 9fa0b4fece73b1baa452dfa2e240737b6ddde67c..5099e27b16e774d84455a543000d1756eba3b83a 100644 (file)
@@ -1393,7 +1393,7 @@ static int do_import_diff(librbd::Image &image, const char *path)
     size = (uint64_t)stat_buf.st_size;
   }
 
-  char buf[15];
+  char buf[strlen(RBD_DIFF_BANNER) + 1];
   r = safe_read_exact(fd, buf, strlen(RBD_DIFF_BANNER));
   if (r < 0)
     goto done;