From 2736eb7b090bcec9756c55f312cc97a4521f8b02 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Sun, 25 Apr 2010 20:36:06 +0100 Subject: [PATCH] Demand Attach: Volumes and vnodes are different fssync-debug attempts to copy sizeof(Volume) bytes into an object defined as a Vnode, a sure fire way to make things go boom. gcc on Snow Leopard picks this up as a buffer overflow, and warns about it. Fix the problem by only copying sizeof(Vnode) bytes. Change-Id: Iadcda0b465f9a9f310dcbe4d3862ea479e052674 Reviewed-on: http://gerrit.openafs.org/1834 Reviewed-by: Tom Keiser Reviewed-by: Alistair Ferguson Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/vol/fssync-debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vol/fssync-debug.c b/src/vol/fssync-debug.c index 86b905f65..858b00412 100644 --- a/src/vol/fssync-debug.c +++ b/src/vol/fssync-debug.c @@ -973,7 +973,7 @@ VnQuery(struct cmd_syndesc * as, void * rock) do_vnqry(&state, &res); if (res.hdr.response == SYNC_OK) { - memcpy(&v, res.payload.buf, sizeof(Volume)); + memcpy(&v, res.payload.buf, sizeof(Vnode)); printf("vnode = {\n"); -- 2.39.5