From b54ca0c3df4f21315bebdb96dc81cdf1abb9b214 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Sun, 21 Feb 2016 12:41:55 +0200 Subject: bios-linker-loader: document+validate input While guest/host ABI is documented in hw/acpi/bios-linker-loader.c, the API was left undocumented. This adds documentation for all API functions. Additionally, input is validated to make sure all pointers fall within range of provided files. To allow this validation for checksum commands, bios_linker_loader_add_checksum is changed to accept GArray * in place of void *. Reported-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- include/hw/acpi/bios-linker-loader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/hw/acpi/bios-linker-loader.h b/include/hw/acpi/bios-linker-loader.h index 498c0af773..e54b6b4565 100644 --- a/include/hw/acpi/bios-linker-loader.h +++ b/include/hw/acpi/bios-linker-loader.h @@ -13,7 +13,7 @@ void bios_linker_loader_alloc(GArray *linker, bool alloc_fseg); void bios_linker_loader_add_checksum(GArray *linker, const char *file, - void *table, + GArray *table, void *start, unsigned size, uint8_t *checksum); -- cgit v1.2.3