Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 297d6b6e authored by Paul Meyer's avatar Paul Meyer Committed by Greg Kroah-Hartman
Browse files

hv: kvp: Avoid reading past allocated blocks from KVP file



While reading in more than one block (50) of KVP records, the allocation
goes per block, but the reads used the total number of allocated records
(without resetting the pointer/stream). This causes the records buffer to
overrun when the refresh reads more than one block over the previous
capacity (e.g. reading more than 100 KVP records whereas the in-memory
database was empty before).

Fix this by reading the correct number of KVP records from file each time.

Signed-off-by: default avatarPaul Meyer <Paul.Meyer@microsoft.com>
Signed-off-by: default avatarLong Li <longli@microsoft.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7fa32e5e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment