1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
From 659a6eb5434039c27b41a9d06edc64923e5042b9 Mon Sep 17 00:00:00 2001
From: Alon Bar-Lev <alon.barlev@gmail.com>
Date: Wed, 15 Aug 2018 18:30:51 +0300
Subject: [PATCH] build: pam_p11: unsigned comparison
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
---
src/pam_p11.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pam_p11.c b/src/pam_p11.c
index 960c164..1cf6cb2 100644
--- a/src/pam_p11.c
+++ b/src/pam_p11.c
@@ -553,7 +553,7 @@ static int randomize(pam_handle_t *pamh, unsigned char *r, unsigned int r_len)
{
int ok = 0;
int fd = open("/dev/urandom", O_RDONLY);
- if (0 <= fd && read(fd, r, r_len) == r_len) {
+ if (0 <= fd && read(fd, r, r_len) == (ssize_t)r_len) {
ok = 1;
} else {
pam_syslog(pamh, LOG_CRIT, "Error reading from /dev/urandom: %s",
--
2.16.4
|