---
 src/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util.c b/src/util.c
index 2d3a7f7..da32cc5 100644
--- a/src/util.c
+++ b/src/util.c
@@ -45,7 +45,7 @@ int __connman_util_get_random(uint64_t *val)
        if (!val)
                return -EINVAL;
 
-       if (read(f, val, sizeof(*val)) < 0) {
+       if (read(f, val, sizeof(uint64_t)) < 0) {
                r = -errno;
                connman_warn_once("Could not read from "URANDOM);
                *val = random();
-- 
2.1.3

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to