re: PNPACPI: add support for HP vendor-specific CCSR descriptors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Bjorn Helgaas,

The patch 40ab4f4c1d84: "PNPACPI: add support for HP vendor-specific
CCSR descriptors" from Jun 27, 2008, leads to the following static
checker warning:

	drivers/pnp/pnpacpi/rsparser.c:170 pnpacpi_parse_allocated_vendor()
	error: __memcpy() 'vendor->byte_data' too small (1 vs 8)

drivers/pnp/pnpacpi/rsparser.c
   164  static void pnpacpi_parse_allocated_vendor(struct pnp_dev *dev,
   165                                      struct acpi_resource_vendor_typed *vendor)
   166  {
   167          if (vendor_resource_matches(dev, vendor, &hp_ccsr_uuid, 16)) {
   168                  u64 start, length;
   169  
   170                  memcpy(&start, vendor->byte_data, sizeof(start));
                                       ^^^^^^^^^^^^^^^^^
This is only 1 byte follow by 7 bytes of data we didn't want.

   171                  memcpy(&length, vendor->byte_data + 8, sizeof(length));
   172  
   173                  pnp_add_mem_resource(dev, start, start + length - 1, 0);
   174          }
   175  }

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux