svn rev #24507: trunk/src/plugins/kdb/db2/libdb2/hash/

ghudson@MIT.EDU ghudson at MIT.EDU
Wed Nov 3 12:43:49 EDT 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=24507
Commit By: ghudson
Log Message:
Avoid running off the end of the spares array in db2's page_to_oaddr()
in unrealistically large databases.



Changed Files:
U   trunk/src/plugins/kdb/db2/libdb2/hash/hash_page.c
Modified: trunk/src/plugins/kdb/db2/libdb2/hash/hash_page.c
===================================================================
--- trunk/src/plugins/kdb/db2/libdb2/hash/hash_page.c	2010-11-03 16:42:05 UTC (rev 24506)
+++ trunk/src/plugins/kdb/db2/libdb2/hash/hash_page.c	2010-11-03 16:43:49 UTC (rev 24507)
@@ -1276,7 +1276,7 @@
 	 * 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;




More information about the cvs-krb5 mailing list