mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
USB: chaoskey read offset bug
Rng reads in chaoskey driver could return the same data under the certain conditions. Signed-off-by: Alexander Inyukhin <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
8484bf2981
commit
1d5c47f555
1 changed files with 1 additions and 1 deletions
|
|
@ -472,7 +472,7 @@ static int chaoskey_rng_read(struct hwrng *rng, void *data,
|
|||
if (this_time > max)
|
||||
this_time = max;
|
||||
|
||||
memcpy(data, dev->buf, this_time);
|
||||
memcpy(data, dev->buf + dev->used, this_time);
|
||||
|
||||
dev->used += this_time;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue