diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-25 19:40:27 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-26 06:59:42 +0000 |
| commit | 0626bf48f425ad890bca4b245c140e8d1b1e28d9 (patch) | |
| tree | 2a84392ce896b1c91d0772817e4389f546cb8c88 /util/libreboot-utils/lib | |
| parent | 50e3b1f45d13a6ebb662eee8adddcc58e385698b (diff) | |
lbutils: cast to prevent ub in rset()
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/lib')
| -rw-r--r-- | util/libreboot-utils/lib/rand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/libreboot-utils/lib/rand.c b/util/libreboot-utils/lib/rand.c index 6a9d1671..8e707ba8 100644 --- a/util/libreboot-utils/lib/rand.c +++ b/util/libreboot-utils/lib/rand.c @@ -55,7 +55,7 @@ rset(void *buf, size_t n) if ((fd = open("/dev/urandom", O_RDONLY)) < 0) goto err; retry_rand: - if ((rc = read(fd, buf + off, n - off)) < 0) { + if ((rc = read(fd, (unsigned char *)buf + off, n - off)) < 0) { #elif defined(__linux__) retry_rand: if ((rc = (ssize_t)syscall(SYS_getrandom, |
