android_kernel_oneplus_msm8998/tools/hv
Paul Meyer 90e2ea6dc8 hv: kvp: Avoid reading past allocated blocks from KVP file
commit 297d6b6e56c2977fc504c61bbeeaa21296923f89 upstream.

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: Paul Meyer <Paul.Meyer@microsoft.com>
Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-16 10:33:48 +01:00
..
hv_fcopy_daemon.c tools: hv: report ENOSPC errors in hv_fcopy_daemon 2016-09-15 08:27:40 +02:00
hv_get_dhcp_info.sh Tools: hv: Add an example script to retrieve dhcp state 2012-09-10 16:42:32 -07:00
hv_get_dns_info.sh Tools: hv: Add an example script to retrieve DNS entries 2012-09-04 15:59:27 -07:00
hv_kvp_daemon.c hv: kvp: Avoid reading past allocated blocks from KVP file 2017-12-16 10:33:48 +01:00
hv_set_ifconfig.sh tools: hv: Fix how ifcfg-* file is created 2013-01-17 11:47:21 -08:00
hv_vss_daemon.c tools: hv: vss: fix the write()'s argument: error -> vss_msg 2016-03-03 15:07:16 -08:00
lsvmbus tools: hv: add a python script lsvmbus to list VMBus devices 2015-08-05 11:44:29 -07:00
Makefile tools/hv: Use include/uapi with __EXPORTED_HEADERS__ 2016-04-12 09:08:53 -07:00