Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161809733
D54905.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
940 B
Referenced Files
None
Subscribers
None
D54905.diff
View Options
diff --git a/lib/libc/db/btree/bt_seq.c b/lib/libc/db/btree/bt_seq.c
--- a/lib/libc/db/btree/bt_seq.c
+++ b/lib/libc/db/btree/bt_seq.c
@@ -325,7 +325,7 @@
static int
__bt_first(BTREE *t, const DBT *key, EPG *erval, int *exactp)
{
- PAGE *h;
+ PAGE *h, *hprev;
EPG *ep, save;
pgno_t pg;
@@ -338,7 +338,7 @@
* page) and return it.
*/
if ((ep = __bt_search(t, key, exactp)) == NULL)
- return (0);
+ return (RET_SPECIAL);
if (*exactp) {
if (F_ISSET(t, B_NODUPS)) {
*erval = *ep;
@@ -369,14 +369,14 @@
break;
if (h->pgno != save.page->pgno)
mpool_put(t->bt_mp, h, 0);
- if ((h = mpool_get(t->bt_mp,
+ if ((hprev = mpool_get(t->bt_mp,
h->prevpg, 0)) == NULL) {
if (h->pgno == save.page->pgno)
mpool_put(t->bt_mp,
save.page, 0);
return (RET_ERROR);
}
- ep->page = h;
+ ep->page = h = hprev;
ep->index = NEXTINDEX(h);
}
--ep->index;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 8, 1:39 AM (5 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34821951
Default Alt Text
D54905.diff (940 B)
Attached To
Mode
D54905: btree/bt_seq.c: Fix two NULL pointer dereferences
Attached
Detach File
Event Timeline
Log In to Comment