diff options
| author | Mattias Andrée <m@maandree.se> | 2026-02-22 19:35:45 +0100 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-02-22 19:35:45 +0100 |
| commit | 48f2418370e6bf41cf023a87a48f026cccd6c6ed (patch) | |
| tree | 0fc425dd5bbfca549ec865db6a3c66f089a1f8e2 /krandom.c | |
| parent | m fixes (diff) | |
| download | krandom-48f2418370e6bf41cf023a87a48f026cccd6c6ed.tar.gz krandom-48f2418370e6bf41cf023a87a48f026cccd6c6ed.tar.bz2 krandom-48f2418370e6bf41cf023a87a48f026cccd6c6ed.tar.xz | |
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
| -rw-r--r-- | krandom.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -147,8 +147,8 @@ main(int argc, char *argv[]) fd = open(URANDOM, O_RDONLY); if (fd < 0) goto fail; - for (ptr = 0, length = sizeof(state.S); ptr < length;) { - got = read(fd, (char*)(state.S) + ptr, length - ptr); + for (ptr = 0, length = sizeof(state.S.w8); ptr < length;) { + got = read(fd, &state.S.w8[ptr], length - ptr); if (got <= 0) { if (!got) { fprintf(stderr, "%s: %s contained less than %zu bytes\n", argv0, URANDOM, length); |
