]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
uuidd: fix uuidd -r -n 2
authorPetr Uzel <petr.uzel@suse.cz>
Tue, 1 Feb 2011 14:46:53 +0000 (15:46 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 8 Feb 2011 14:01:26 +0000 (15:01 +0100)
uuidd -r -n 2 failed with "Unexpected reply length from server 36".
Fixed by this patch.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
misc-utils/uuidd.c

index 716a5824a16b6e95336423ec26866db74cb11fa7..2c8d2ca06697b71896377711c053ddea1259e033 100644 (file)
@@ -213,7 +213,7 @@ static int call_daemon(const char *socket_path, int op, char *buf,
                        *num = -1;
        }
        if ((ret > 0) && (op == 5)) {
-               if (*num >= (int) sizeof(int))
+               if (reply_len >= (int) sizeof(int))
                        memcpy(buf, num, sizeof(int));
                else
                        *num = -1;