[Sheepdog] [PATCH] shepherd: fix memory violation when showing object information

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Tue Apr 13 10:25:52 CEST 2010


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 shepherd/shepherd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/shepherd/shepherd.c b/shepherd/shepherd.c
index cc06908..e16a952 100644
--- a/shepherd/shepherd.c
+++ b/shepherd/shepherd.c
@@ -846,7 +846,7 @@ static void parse_objs(uint64_t oid, obj_parser_func_t func, void *data)
 	}
 
 	for (i = 0; i < nr_nodes; i++) {
-		unsigned wlen = 0, rlen = sizeof(buf);
+		unsigned wlen = 0, rlen = sizeof(sizeof(struct sheepdog_inode));
 		struct sd_obj_req hdr;
 		struct sd_obj_rsp *rsp = (struct sd_obj_rsp *)&hdr;
 
-- 
1.5.6.5




More information about the sheepdog mailing list