/ Check-in [0bf4c70a]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the node hash function in RTREE to ensure that it always returns a non-negative value.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0bf4c70a6849da74797e8616a4f3730492ad02882ae67a0fe0f3b3cc3f1043b4
User & Date: drh 2018-12-21 18:17:35
Context
2018-12-21
18:50
The fts4umlaut.test module requires FTS5, so do not try to run it without that module. check-in: dee3ae90 user: drh tags: trunk
18:17
Fix the node hash function in RTREE to ensure that it always returns a non-negative value. check-in: 0bf4c70a user: drh tags: trunk
17:51
Fix a potential NULL-pointer deference in RTREE due to corrupt shadow tables. check-in: 1fdd3604 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ext/rtree/rtree.c.

561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
  p->isDirty = 1;
}

/*
** Given a node number iNode, return the corresponding key to use
** in the Rtree.aHash table.
*/
static int nodeHash(i64 iNode){
  return iNode % HASHSIZE;
}

/*
** Search the node hash table for node iNode. If found, return a pointer
** to it. Otherwise, return 0.
*/
static RtreeNode *nodeHashLookup(Rtree *pRtree, i64 iNode){







|
|







561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
  p->isDirty = 1;
}

/*
** Given a node number iNode, return the corresponding key to use
** in the Rtree.aHash table.
*/
static unsigned int nodeHash(i64 iNode){
  return ((unsigned)iNode) % HASHSIZE;
}

/*
** Search the node hash table for node iNode. If found, return a pointer
** to it. Otherwise, return 0.
*/
static RtreeNode *nodeHashLookup(Rtree *pRtree, i64 iNode){