/ Check-in [92facbc7]
Login

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

Overview
Comment:Fix a buffer overwrite in shell.c.in (part of the new .recover code).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 92facbc73a940d2844ac88fafd2d2dadb10886fb0b7c53e23f346d18fa6d6327
User & Date: dan 2019-04-29 11:41:46
Context
2019-04-29
13:48
Do not de-duplicate columns index columns associated with a WITHOUT ROWID table if the columns have different collating sequences. This is the fix for ticket [3182d3879020ef3b2]. There is one test case added, but most of the tests are done in TH3. check-in: 1b1dd4d4 user: drh tags: trunk
11:41
Fix a buffer overwrite in shell.c.in (part of the new .recover code). check-in: 92facbc7 user: dan tags: trunk
11:27
Fix a stack overflow that could occur when renaming a table that has a trigger containing a window function invocation that itself contains a specific syntax error. check-in: c621fc66 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to src/shell.c.in.

  4006   4006           nCR = (int)strlen(zCR);
  4007   4007         }
  4008   4008       }
  4009   4009   
  4010   4010       if( zNL || zCR ){
  4011   4011         int iOut = 0;
  4012   4012         i64 nMax = (nNL > nCR) ? nNL : nCR;
  4013         -      i64 nAlloc = nMax * nText + (nMax+12)*2;
         4013  +      i64 nAlloc = nMax * nText + (nMax+64)*2;
  4014   4014         char *zOut = (char*)sqlite3_malloc64(nAlloc);
  4015   4015         if( zOut==0 ){
  4016   4016           sqlite3_result_error_nomem(context);
  4017   4017           return;
  4018   4018         }
  4019   4019   
  4020   4020         if( zNL && zCR ){