USB: chaoskey read offset bug
Rng reads in chaoskey driver could return the same data under the certain conditions. Signed-off-by: Alexander Inyukhin <shurick@sectorb.msk.ru> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
8484bf2981
Коммит
1d5c47f555
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче