/ Check-in [b49d56a0]
Login

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

Overview
Comment:Use 64-bit APIs in the fileio.c extension.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b49d56a0faf012978c50fb8662125ea21bdf5054fddf5975644cbc941c153e70
User & Date: drh 2019-01-11 23:08:56
Context
2019-01-12
00:07
Indicate that the database may be corrupt in the fts3corrupt4.test test script. check-in: 473626d5 user: drh tags: trunk
2019-01-11
23:08
Use 64-bit APIs in the fileio.c extension. check-in: b49d56a0 user: drh tags: trunk
21:34
Fix a segfault in fts3 prompted by a corrupted database. check-in: 2d7b1d1d user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/misc/fileio.c.

   148    148     db = sqlite3_context_db_handle(ctx);
   149    149     mxBlob = sqlite3_limit(db, SQLITE_LIMIT_LENGTH, -1);
   150    150     if( nIn>mxBlob ){
   151    151       sqlite3_result_error_code(ctx, SQLITE_TOOBIG);
   152    152       fclose(in);
   153    153       return;
   154    154     }
   155         -  pBuf = sqlite3_malloc( nIn );
          155  +  pBuf = sqlite3_malloc64( nIn );
   156    156     if( pBuf==0 ){
   157    157       sqlite3_result_error_nomem(ctx);
   158    158       fclose(in);
   159    159       return;
   160    160     }
   161    161     if( 1==fread(pBuf, nIn, 1, in) ){
   162         -    sqlite3_result_blob(ctx, pBuf, nIn, sqlite3_free);
          162  +    sqlite3_result_blob64(ctx, pBuf, nIn, sqlite3_free);
   163    163     }else{
   164    164       sqlite3_result_error_code(ctx, SQLITE_IOERR);
   165    165       sqlite3_free(pBuf);
   166    166     }
   167    167     fclose(in);
   168    168   }
   169    169