]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix limit assertions in vdbe.c. Ticket #2740. (CVS 4506)
authordrh <drh@noemail.net>
Tue, 23 Oct 2007 14:55:06 +0000 (14:55 +0000)
committerdrh <drh@noemail.net>
Tue, 23 Oct 2007 14:55:06 +0000 (14:55 +0000)
FossilOrigin-Name: 27f846d089ebe9e4970a2499ad4e2e98773d2e78

manifest
manifest.uuid
src/vdbe.c

index aedf9ded651f48c168044ba7035345955f4ac89e..f5b4691e0787871d720062a0c84a905478d897e1 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Make\ssure\sthe\ssqlite3_vfs_register()\sand\ssqlite3_vfs_unregister()\sAPIs\nwork\sright\seven\sif\snot\sVFS\sis\scurrently\sregistered.\s\sTicket\s#2738.\s(CVS\s4505)
-D 2007-10-23T14:49:59
+C Fix\slimit\sassertions\sin\svdbe.c.\s\sTicket\s#2740.\s(CVS\s4506)
+D 2007-10-23T14:55:07
 F Makefile.in 30c7e3ba426ddb253b8ef037d1873425da6009a8
 F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -165,7 +165,7 @@ F src/update.c e89b980b443d44b68bfc0b1746cdb6308e049ac9
 F src/utf.c ef4b7d83bae533b76c3e1bf635b113fdad86a736
 F src/util.c 49263637e0f228411201501ddfd1138338d6322c
 F src/vacuum.c a5e51c77370c1a6445e86d42abfc43867cdd482d
-F src/vdbe.c 57e37b55c4dcdc9ed71c57180cee514c33d0e8f9
+F src/vdbe.c b21ea40c5b0ae4379394fa2aad92909e1a8736b5
 F src/vdbe.h 03a0fa17f6753a24d6cb585d7a362944a2c115aa
 F src/vdbeInt.h 630145b9bfaa19190ab491f52658a7db550f2247
 F src/vdbeapi.c 21b69e71ab39d8e694c9cdb556a74dbefba9ebda
@@ -584,7 +584,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 3e3475b9e0f996841aa40419693c7c3eaa6c71aa
-R f5b08c77641b2a161a8d65b96bb2a7d8
+P c36500871e85b55cb0804d5c9e88fa6861a507a9
+R 407160c3c038e7e8a4d0ba1b11794db6
 U drh
-Z 7b5ff5d5e516010e45b59cf86b7b1e00
+Z 0e481a3e67cd54e4694f0f724a957ac6
index 63c7ff5a4a11e020b823d42f20b6fc3c65e504ee..ce66008041ec87b2329eab51bce0dd2157d3417e 100644 (file)
@@ -1 +1 @@
-c36500871e85b55cb0804d5c9e88fa6861a507a9
\ No newline at end of file
+27f846d089ebe9e4970a2499ad4e2e98773d2e78
\ No newline at end of file
index 74e7b95d7650fdb3e10778687d5063ce2a2f34fb..1eec0bcc93358f1f289f2fa52f66f590f38d3833 100644 (file)
@@ -43,7 +43,7 @@
 ** in this file for details.  If in doubt, do not deviate from existing
 ** commenting and indentation practices when changing or adding code.
 **
-** $Id: vdbe.c,v 1.651 2007/10/05 16:23:55 drh Exp $
+** $Id: vdbe.c,v 1.652 2007/10/23 14:55:07 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -745,8 +745,8 @@ case OP_String8: {         /* same as TK_STRING */
   assert( pOp->p3!=0 );
   pOp->opcode = OP_String;
   pOp->p1 = strlen(pOp->p3);
-  assert( SQLITE_MAX_SQL_LENGTH < SQLITE_MAX_LENGTH );
-  assert( pOp->p1 < SQLITE_MAX_LENGTH );
+  assert( SQLITE_MAX_SQL_LENGTH <= SQLITE_MAX_LENGTH );
+  assert( pOp->p1 <= SQLITE_MAX_LENGTH );
 
 #ifndef SQLITE_OMIT_UTF16
   if( encoding!=SQLITE_UTF8 ){
@@ -762,7 +762,7 @@ case OP_String8: {         /* same as TK_STRING */
     pOp->p3type = P3_DYNAMIC;
     pOp->p3 = pTos->z;
     pOp->p1 = pTos->n;
-    assert( pOp->p1 < SQLITE_MAX_LENGTH ); /* Due to SQLITE_MAX_SQL_LENGTH */
+    assert( pOp->p1 <= SQLITE_MAX_LENGTH ); /* Due to SQLITE_MAX_SQL_LENGTH */
     break;
   }
 #endif
@@ -774,7 +774,7 @@ case OP_String8: {         /* same as TK_STRING */
 ** The string value P3 of length P1 (bytes) is pushed onto the stack.
 */
 case OP_String: {
-  assert( pOp->p1 < SQLITE_MAX_LENGTH ); /* Due to SQLITE_MAX_SQL_LENGTH */
+  assert( pOp->p1 <= SQLITE_MAX_LENGTH ); /* Due to SQLITE_MAX_SQL_LENGTH */
   pTos++;
   assert( pOp->p3!=0 );
   pTos->flags = MEM_Str|MEM_Static|MEM_Term;
@@ -808,8 +808,8 @@ case OP_Null: {
 case OP_HexBlob: {            /* same as TK_BLOB */
   pOp->opcode = OP_Blob;
   pOp->p1 = strlen(pOp->p3)/2;
-  assert( SQLITE_MAX_SQL_LENGTH < SQLITE_MAX_LENGTH );
-  assert( pOp->p1 < SQLITE_MAX_LENGTH );
+  assert( SQLITE_MAX_SQL_LENGTH <= SQLITE_MAX_LENGTH );
+  assert( pOp->p1 <= SQLITE_MAX_LENGTH );
   if( pOp->p1 ){
     char *zBlob = sqlite3HexToBlob(db, pOp->p3);
     if( !zBlob ) goto no_mem;
@@ -840,7 +840,7 @@ case OP_HexBlob: {            /* same as TK_BLOB */
 */
 case OP_Blob: {
   pTos++;
-  assert( pOp->p1 < SQLITE_MAX_LENGTH ); /* Due to SQLITE_MAX_SQL_LENGTH */
+  assert( pOp->p1 <= SQLITE_MAX_LENGTH ); /* Due to SQLITE_MAX_SQL_LENGTH */
   sqlite3VdbeMemSetStr(pTos, pOp->p3, pOp->p1, 0, 0);
   pTos->enc = encoding;
   break;