projects
/
krb5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bbbb3a
)
Avoid running off the end of the spares array in db2's page_to_oaddr()
author
Greg Hudson
<ghudson@mit.edu>
Wed, 3 Nov 2010 16:43:49 +0000
(16:43 +0000)
committer
Greg Hudson
<ghudson@mit.edu>
Wed, 3 Nov 2010 16:43:49 +0000
(16:43 +0000)
in unrealistically large databases.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24507
dc483132
-0cff-0310-8789-
dd5450dbe970
src/plugins/kdb/db2/libdb2/hash/hash_page.c
patch
|
blob
|
history
diff --git
a/src/plugins/kdb/db2/libdb2/hash/hash_page.c
b/src/plugins/kdb/db2/libdb2/hash/hash_page.c
index f27e7dd86afa4b4b18cbff1e6c6adc59c95c1aa5..5841e92b5fb1646930194818355ffe0203b5f486 100644
(file)
--- a/
src/plugins/kdb/db2/libdb2/hash/hash_page.c
+++ b/
src/plugins/kdb/db2/libdb2/hash/hash_page.c
@@
-1276,7
+1276,7
@@
page_to_oaddr(hashp, pgno)
* 3. return...
*/
pgno -= hashp->hdr.hdrpages;
- for (sp = 0; sp < NCACHED; sp++)
+ for (sp = 0; sp < NCACHED
- 1
; sp++)
if (POW2(sp) + hashp->hdr.spares[sp] < pgno &&
(POW2(sp + 1) + hashp->hdr.spares[sp + 1]) > pgno)
break;