X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Facpi-fpdt.c;h=7bae47f85f2fb5199e301233f092a984a002798c;hb=c99c09a2dc0f72e6f10449c9e110158612a43ab6;hp=75648b4d86f91af3a4327c11232d2630c91da6c3;hpb=6c7980093c4e39d07bf06484f96f489e236c7c29;p=elogind.git diff --git a/src/shared/acpi-fpdt.c b/src/shared/acpi-fpdt.c index 75648b4d8..7bae47f85 100644 --- a/src/shared/acpi-fpdt.c +++ b/src/shared/acpi-fpdt.c @@ -109,6 +109,8 @@ int acpi_get_boot_usec(usec_t *loader_start, usec_t *loader_exit) { for (rec = (struct acpi_fpdt_header *)(buf + sizeof(struct acpi_table_header)); (char *)rec < buf + l; rec = (struct acpi_fpdt_header *)((char *)rec + rec->length)) { + if (rec->length <= 0) + break; if (rec->type != ACPI_FPDT_TYPE_BOOT) continue; if (rec->length != sizeof(struct acpi_fpdt_header))