/ Check-in [25f6ed8d]
Login

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

Overview
Comment:Avoid a potential null-pointer dereference following an OOM.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | rowvalue
Files: files | file ages | folders
SHA1:25f6ed8de4df9c9890d4a352a6d11084433e82ea
User & Date: drh 2016-08-24 00:25:27
Context
2016-08-24
00:51
The previous OOM fix was bad. Back it out and replace it with a better one. check-in: 1e3bc369 user: drh tags: rowvalue
00:25
Avoid a potential null-pointer dereference following an OOM. check-in: 25f6ed8d user: drh tags: rowvalue
2016-08-23
19:02
Simplify the row value misuse error message. check-in: 838c50a5 user: drh tags: rowvalue
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/expr.c.

  2099   2099   ){
  2100   2100     Select *p;                            /* SELECT to the right of IN operator */
  2101   2101     int eType = 0;                        /* Type of RHS table. IN_INDEX_* */
  2102   2102     int iTab = pParse->nTab++;            /* Cursor of the RHS table */
  2103   2103     int mustBeUnique;                     /* True if RHS must be unique */
  2104   2104     Vdbe *v = sqlite3GetVdbe(pParse);     /* Virtual machine being coded */
  2105   2105   
         2106  +  if( pParse->db->mallocFailed ) return IN_INDEX_NOOP;
  2106   2107     assert( pX->op==TK_IN );
  2107   2108     mustBeUnique = (inFlags & IN_INDEX_LOOP)!=0;
  2108   2109   
  2109   2110     /* If the RHS of this IN(...) operator is a SELECT, and if it matters 
  2110   2111     ** whether or not the SELECT result contains NULL values, check whether
  2111   2112     ** or not NULL is actually possible (it may not be, for example, due 
  2112   2113     ** to NOT NULL constraints in the schema). If no NULL values are possible,