/ Check-in [fd4ec0cd]
Login

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

Overview
Comment:Fix a potential use of an uninitialized pointer in RTree following an OOM error.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fd4ec0cdbd84f3333dd4c7a4236491bce6b9ab21fb2c088751ca1279b31bd864
User & Date: drh 2017-09-21 13:11:47
Context
2017-09-21
19:08
Fix harmless UB in the ICU extension. check-in: 68e9a840 user: drh tags: trunk
13:11
Fix a potential use of an uninitialized pointer in RTree following an OOM error. check-in: fd4ec0cd user: drh tags: trunk
10:24
Fix a bug in tool/mksourceid.c: The mksourceid.c program was incorrectly including the "# Remove this line" line of the Fossil-generated "manifest" file in the SHA3 hash. That means that all SQLITE_SOURCE_IDs for trunk versions going back to check-in [30966d56] (2017-08-22) are incorrect. check-in: 65765222 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/rtree/rtree.c.

  2849   2849   /*
  2850   2850   ** Remove the entry with rowid=iDelete from the r-tree structure.
  2851   2851   */
  2852   2852   static int rtreeDeleteRowid(Rtree *pRtree, sqlite3_int64 iDelete){
  2853   2853     int rc;                         /* Return code */
  2854   2854     RtreeNode *pLeaf = 0;           /* Leaf node containing record iDelete */
  2855   2855     int iCell;                      /* Index of iDelete cell in pLeaf */
  2856         -  RtreeNode *pRoot;               /* Root node of rtree structure */
         2856  +  RtreeNode *pRoot = 0;           /* Root node of rtree structure */
  2857   2857   
  2858   2858   
  2859   2859     /* Obtain a reference to the root node to initialize Rtree.iDepth */
  2860   2860     rc = nodeAcquire(pRtree, 1, 0, &pRoot);
  2861   2861   
  2862   2862     /* Obtain a reference to the leaf node that contains the entry 
  2863   2863     ** about to be deleted.