From 19afc57eefa662cc375e267008dd5d7515a4d107 Mon Sep 17 00:00:00 2001 From: Brennan Ashton Date: Wed, 29 Apr 2020 19:54:58 -0700 Subject: [PATCH] Fix null pointer reference in x86_64 rng Signed-off-by: Brennan Ashton --- arch/x86_64/src/intel64/intel64_rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86_64/src/intel64/intel64_rng.c b/arch/x86_64/src/intel64/intel64_rng.c index 3c65cc075d..23bb1e1630 100644 --- a/arch/x86_64/src/intel64/intel64_rng.c +++ b/arch/x86_64/src/intel64/intel64_rng.c @@ -141,7 +141,7 @@ static ssize_t x86_rngread(struct file *filep, char *buffer, size_t buflen) { unsigned short temp = 0; - while (_rdrand16_step((unsigned short *)temp)) + while (_rdrand16_step(&temp)) { sched_yield(); }