* re: PNPACPI: add support for HP vendor-specific CCSR descriptors
@ 2016-01-25 18:31 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-01-25 18:31 UTC (permalink / raw)
To: bjorn.helgaas; +Cc: linux-acpi
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-01-25 18:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-25 18:31 PNPACPI: add support for HP vendor-specific CCSR descriptors Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).