svn commit: r218685 - head/sys/dev/acpica
mdf at FreeBSD.org
mdf at FreeBSD.org
Mon Feb 14 18:47:20 UTC 2011
On Mon, Feb 14, 2011 at 10:33 AM, John Baldwin <jhb at freebsd.org> wrote:
> On Monday, February 14, 2011 12:20:20 pm Matthew D Fleming wrote:
>> Author: mdf
>> Date: Mon Feb 14 17:20:20 2011
>> New Revision: 218685
>> URL: http://svn.freebsd.org/changeset/base/218685
>>
>> Log:
>> Prevent reading from the ACPI_RESOURCE past its actual end. For
>> paranoia limit to the size of the ACPI_RESOURCE as well.
>
> I think in practice that len would never be > sizeof(ACPI_RESOURCE).
>
> You could probably get by with using a KASSERT() instead:
>
> KASSERT(res->Length <= sizeof(ACPI_RESOURCE), "resource too large"));
> bcopy(res, req->acpi_res, res->Length);
Thanks. I wanted to be paranoid since the problem was sporadic.
Anyone who can better test this code should feel free to modify it further.
Thanks,
matthew
More information about the svn-src-all
mailing list