From: Josh Durgin Date: Sat, 30 Mar 2013 00:03:59 +0000 (-0700) Subject: rbd: make diff banner length depend on the banner X-Git-Tag: v0.62~118^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d86fb04f48c5a98ef136658bde2cb5432f2e1c4a;p=ceph.git rbd: make diff banner length depend on the banner Signed-off-by: Josh Durgin --- diff --git a/src/rbd.cc b/src/rbd.cc index 9fa0b4fece73..5099e27b16e7 100644 --- a/src/rbd.cc +++ b/src/rbd.cc @@ -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;