/ Check-in [048add13]
Login

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

Overview
Comment:Handle oversize floating point values carefully when converting to integers for the '%' binary operator.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:048add13fc10e69ae504a49c4663612381d928b2cf1f9cdab4ff34bd40f601a3
User & Date: drh 2019-01-18 17:53:50
Context
2019-01-18
18:52
Avoid integer overflow when computing the array of a bounding box with the rtree_i32 virtual table. check-in: b352f159 user: drh tags: trunk
17:53
Handle oversize floating point values carefully when converting to integers for the '%' binary operator. check-in: 048add13 user: drh tags: trunk
16:06
Fix a fairly obscure problem allowing an "ALTER TABLE RENAME col TO ..." statement to modify the schema in such a way as to break a reference within a trigger program. check-in: 64bec9e6 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

  1579   1579         case OP_Divide: {
  1580   1580           /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
  1581   1581           if( rA==(double)0 ) goto arithmetic_result_is_null;
  1582   1582           rB /= rA;
  1583   1583           break;
  1584   1584         }
  1585   1585         default: {
  1586         -        iA = (i64)rA;
  1587         -        iB = (i64)rB;
         1586  +        iA = sqlite3VdbeIntValue(pIn1);
         1587  +        iB = sqlite3VdbeIntValue(pIn2);
  1588   1588           if( iA==0 ) goto arithmetic_result_is_null;
  1589   1589           if( iA==-1 ) iA = 1;
  1590   1590           rB = (double)(iB % iA);
  1591   1591           break;
  1592   1592         }
  1593   1593       }
  1594   1594   #ifdef SQLITE_OMIT_FLOATING_POINT