projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58340a0
)
kallsyms: fix potential overflow in binary search
author
Vegard Nossum
<
[email protected]
>
Fri, 25 Jul 2008 08:45:34 +0000
(
01:45
-0700)
committer
Linus Torvalds
<
[email protected]
>
Fri, 25 Jul 2008 17:53:27 +0000
(10:53 -0700)
This will probably never trigger... but it won't hurt to be careful.
http://googleresearch.blogspot.com/2006/06/extra-extra-read-all-about-it-nearly.html
Signed-off-by: Vegard Nossum <
[email protected]
>
Cc: Joshua Bloch <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
kernel/kallsyms.c
patch
|
blob
|
history
diff --git
a/kernel/kallsyms.c
b/kernel/kallsyms.c
index 6fc0040f3e3abacade62c7d63f74d240974d80fe..38fc10ac75415a8ff4da69b68d90facf61eb5e41 100644
(file)
--- a/
kernel/kallsyms.c
+++ b/
kernel/kallsyms.c
@@
-176,7
+176,7
@@
static unsigned long get_symbol_pos(unsigned long addr,
high = kallsyms_num_syms;
while (high - low > 1) {
- mid =
(low + high
) / 2;
+ mid =
low + (high - low
) / 2;
if (kallsyms_addresses[mid] <= addr)
low = mid;
else