/ Check-in [aee73fd2]
Login

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

Overview
Comment:Fix a segfault that could occur in sqlite3session_diff() if NULL were passed as the pzErrMsg argument.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: aee73fd28f031a2568ac723de0826be7f1dca6be3b049e4a04fb47af75dcf4bf
User & Date: dan 2019-05-20 19:46:30
Context
2019-05-21
14:42
Use a statement journal for all CREATE INDEX statements in case an indexed exprsesion throws an exception when it is evaluated. Fix for [b5ca442a]. check-in: b8071d10 user: dan tags: trunk
2019-05-20
19:46
Fix a segfault that could occur in sqlite3session_diff() if NULL were passed as the pzErrMsg argument. check-in: aee73fd2 user: dan tags: trunk
18:43
Improvements to the automatic compile-time selection of byte-order, as suggested on the mailing list by Seb Kemper. check-in: b7aad929 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/session/sqlite3session.c.

  1620   1620               if( sqlite3_stricmp(azCol[i], pTo->azCol[i]) ) bMismatch = 1;
  1621   1621               if( abPK[i] ) bHasPk = 1;
  1622   1622             }
  1623   1623           }
  1624   1624         }
  1625   1625         sqlite3_free((char*)azCol);
  1626   1626         if( bMismatch ){
  1627         -        *pzErrMsg = sqlite3_mprintf("table schemas do not match");
         1627  +        if( pzErrMsg ){
         1628  +          *pzErrMsg = sqlite3_mprintf("table schemas do not match");
         1629  +        }
  1628   1630           rc = SQLITE_SCHEMA;
  1629   1631         }
  1630   1632         if( bHasPk==0 ){
  1631   1633           /* Ignore tables with no primary keys */
  1632   1634           goto diff_out;
  1633   1635         }
  1634   1636       }