do_epoch_log_read() reads timestamp with sizeof(timestamp). But the size should be sizeof(*timestamp). This would cause problems on 32bit architectures.
Signed-off-by: Hitoshi Mitake <[email protected]> --- sheep/store.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sheep/store.c b/sheep/store.c index c5101aa..2a551ba 100644 --- a/sheep/store.c +++ b/sheep/store.c @@ -105,8 +105,8 @@ static int do_epoch_log_read(uint32_t epoch, struct sd_node *nodes, int len, nr_nodes = ret / sizeof(struct sd_node); if (timestamp) { - ret = xread(fd, timestamp, sizeof(timestamp)); - if (ret != sizeof(timestamp)) + ret = xread(fd, timestamp, sizeof(*timestamp)); + if (ret != sizeof(*timestamp)) goto err; } -- 1.7.5.1 -- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
