Whamcloud - gitweb
libuuid: Fix bug which caused uuidd to fail if sizeof(int) != sizeof(int *)
authorTheodore Ts'o <tytso@mit.edu>
Fri, 21 Dec 2007 16:32:48 +0000 (11:32 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 21 Dec 2007 16:32:48 +0000 (11:32 -0500)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/uuid/gen_uuid.c

index 397a207..0bea060 100644 (file)
@@ -421,9 +421,9 @@ static int get_uuid_via_daemon(int op, uuid_t out, int *num)
        op_buf[0] = op;
        op_len = 1;
        if (op == UUIDD_OP_BULK_TIME_UUID) {
-               memcpy(op_buf+1, num, sizeof(num));
-               op_len += sizeof(num);
-               expected += sizeof(num);
+               memcpy(op_buf+1, num, sizeof(*num));
+               op_len += sizeof(*num);
+               expected += sizeof(*num);
        }
 
        ret = write(s, op_buf, op_len);