Commit e4620130 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branch 'pnp'

Merge a PNP update for 6.8-rc1:

 - Adjust pnpacpi_parse_allocated_vendor() to use memcpy() on a full
   structure field (Dmitry Antipov).

* pnp:
  PNP: ACPI: fix fortify warning
parents 4ab8d27a ba3f5058
......@@ -151,13 +151,13 @@ static int vendor_resource_matches(struct pnp_dev *dev,
static void pnpacpi_parse_allocated_vendor(struct pnp_dev *dev,
struct acpi_resource_vendor_typed *vendor)
{
if (vendor_resource_matches(dev, vendor, &hp_ccsr_uuid, 16)) {
u64 start, length;
struct { u64 start, length; } range;
memcpy(&start, vendor->byte_data, sizeof(start));
memcpy(&length, vendor->byte_data + 8, sizeof(length));
pnp_add_mem_resource(dev, start, start + length - 1, 0);
if (vendor_resource_matches(dev, vendor, &hp_ccsr_uuid,
sizeof(range))) {
memcpy(&range, vendor->byte_data, sizeof(range));
pnp_add_mem_resource(dev, range.start, range.start +
range.length - 1, 0);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment