* [2.6 patch] drivers/pnp/pnpacpi/rsparser.c: fix an array overflow
@ 2005-03-27 20:33 Adrian Bunk
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2005-03-27 20:33 UTC (permalink / raw)
To: ambx1-IBH0VoN/3vPQT0dZR+AlfA
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
len.brown-ral2JQCrhuEAvxtiuMwx3w,
acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Matthieu Castet,
Li Shaohua
This patch fixes an array overflow found by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk-HeJ8Db2Gnd6zQB+pC5nmwQ@public.gmane.org>
--- linux-2.6.12-rc1-mm1-full/drivers/pnp/pnpacpi/rsparser.c.old 2005-03-23 02:58:31.000000000 +0100
+++ linux-2.6.12-rc1-mm1-full/drivers/pnp/pnpacpi/rsparser.c 2005-03-23 03:02:49.000000000 +0100
@@ -94,8 +94,8 @@
pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table * res, int dma)
{
int i = 0;
- while (!(res->dma_resource[i].flags & IORESOURCE_UNSET) &&
- i < PNP_MAX_DMA)
+ while (i < PNP_MAX_DMA &&
+ !(res->dma_resource[i].flags & IORESOURCE_UNSET))
i++;
if (i < PNP_MAX_DMA) {
res->dma_resource[i].flags = IORESOURCE_DMA; // Also clears _UNSET flag
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 2+ messages in thread
* [2.6 patch] drivers/pnp/pnpacpi/rsparser.c: fix an array overflow
@ 2005-04-09 18:04 Adrian Bunk
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2005-04-09 18:04 UTC (permalink / raw)
To: Andrew Morton
Cc: ambx1-IBH0VoN/3vPQT0dZR+AlfA, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
len.brown-ral2JQCrhuEAvxtiuMwx3w,
acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Matthieu Castet,
Li Shaohua
This patch fixes an array overflow found by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk-HeJ8Db2Gnd6zQB+pC5nmwQ@public.gmane.org>
---
This patch was already sent on:
- 27 Mar 2005
--- linux-2.6.12-rc1-mm1-full/drivers/pnp/pnpacpi/rsparser.c.old 2005-03-23 02:58:31.000000000 +0100
+++ linux-2.6.12-rc1-mm1-full/drivers/pnp/pnpacpi/rsparser.c 2005-03-23 03:02:49.000000000 +0100
@@ -94,8 +94,8 @@
pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table * res, int dma)
{
int i = 0;
- while (!(res->dma_resource[i].flags & IORESOURCE_UNSET) &&
- i < PNP_MAX_DMA)
+ while (i < PNP_MAX_DMA &&
+ !(res->dma_resource[i].flags & IORESOURCE_UNSET))
i++;
if (i < PNP_MAX_DMA) {
res->dma_resource[i].flags = IORESOURCE_DMA; // Also clears _UNSET flag
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-09 18:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-09 18:04 [2.6 patch] drivers/pnp/pnpacpi/rsparser.c: fix an array overflow Adrian Bunk
-- strict thread matches above, loose matches on Subject: below --
2005-03-27 20:33 Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox