/ Check-in [bf0a6634]
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:Change a type in shell.c.in from "int" to "sqlite3_int64" in order to avoid a compiler warning and possible integer overflow.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: bf0a6634cd8f9457992b8da522a6775a304156815bf6f4f64f96016356baa870
User & Date: dan 2018-10-03 11:13:30
Context
2018-10-03
18:05
Add an ALWAYS on an unreachable branch in the ALTER TABLE logic. check-in: ebcd4523 user: drh tags: trunk
11:13
Change a type in shell.c.in from "int" to "sqlite3_int64" in order to avoid a compiler warning and possible integer overflow. check-in: bf0a6634 user: dan tags: trunk
2018-10-02
20:16
Add an additional assert() verifying mutex invariants on the unixShmSystemLock() routine in the unix VFS. check-in: cb151106 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/shell.c.in.

1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
  if( x!=sz ){
    sqlite3_result_error(context, "could not read back the whole file", -1);
    goto edit_func_end;
  }
  if( bBin ){
    sqlite3_result_blob64(context, p, sz, sqlite3_free);
  }else{
    int i, j;
    if( hasCRNL ){
      /* If the original contains \r\n then do no conversions back to \n */
      j = sz;
    }else{
      /* If the file did not originally contain \r\n then convert any new
      ** \r\n back into \n */
      for(i=j=0; i<sz; i++){







|







1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
  if( x!=sz ){
    sqlite3_result_error(context, "could not read back the whole file", -1);
    goto edit_func_end;
  }
  if( bBin ){
    sqlite3_result_blob64(context, p, sz, sqlite3_free);
  }else{
    sqlite3_int64 i, j;
    if( hasCRNL ){
      /* If the original contains \r\n then do no conversions back to \n */
      j = sz;
    }else{
      /* If the file did not originally contain \r\n then convert any new
      ** \r\n back into \n */
      for(i=j=0; i<sz; i++){