uuidd: fix uuidd -r -n 2

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>
This commit is contained in:
Petr Uzel 2011-02-01 15:46:53 +01:00 committed by Karel Zak
parent b45fa8b2f1
commit faab2be3f4
1 changed files with 1 additions and 1 deletions

View 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;