projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4f2e2a
)
parisc: Fix read buffer overflow in pdc_stable driver
author
Roel Kluin
<roel.kluin@gmail.com>
Sun, 2 Aug 2009 08:02:28 +0000
(08:02 +0000)
committer
Helge Deller
<deller@gmx.de>
Sun, 2 Aug 2009 10:35:28 +0000
(12:35 +0200)
Check whether index is within bounds before testing the element.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/parisc/pdc_stable.c
patch
|
blob
|
history
diff --git
a/drivers/parisc/pdc_stable.c
b/drivers/parisc/pdc_stable.c
index
f9f9a5f
..
13a64bc
100644
(file)
--- a/
drivers/parisc/pdc_stable.c
+++ b/
drivers/parisc/pdc_stable.c
@@
-370,7
+370,7
@@
pdcspath_layer_read(struct pdcspath_entry *entry, char *buf)
if (!i) /* entry is not ready */
return -ENODATA;
- for (i = 0;
devpath->layers[i] && (likely(i < 6))
; i++)
+ for (i = 0;
i < 6 && devpath->layers[i]
; i++)
out += sprintf(out, "%u ", devpath->layers[i]);
out += sprintf(out, "\n");