mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Various minor fixes and updates to make more test cases pass. (CVS 1370)
FossilOrigin-Name: dbe8385ecf1df8bf0b1baf5e811ec5a1de5c4c42
This commit is contained in:
16
src/vdbe.c
16
src/vdbe.c
@@ -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.285 2004/05/13 05:16:16 danielk1977 Exp $
|
||||
** $Id: vdbe.c,v 1.286 2004/05/13 11:34:16 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -1865,7 +1865,7 @@ case OP_Column: {
|
||||
if( pC->nullRow ){
|
||||
payloadSize = 0;
|
||||
}else if( pC->keyAsData ){
|
||||
u64 payloadSize64;
|
||||
i64 payloadSize64;
|
||||
sqlite3BtreeKeySize(pCrsr, &payloadSize64);
|
||||
payloadSize = payloadSize64;
|
||||
}else{
|
||||
@@ -2072,6 +2072,11 @@ case OP_MakeRecord: {
|
||||
nBytes += sqlite3VarintLen(serial_type);
|
||||
}
|
||||
|
||||
if( nBytes>MAX_BYTES_PER_ROW ){
|
||||
rc = SQLITE_TOOBIG;
|
||||
goto abort_due_to_error;
|
||||
}
|
||||
|
||||
/* Allocate space for the new record. */
|
||||
zNewRecord = sqliteMalloc(nBytes);
|
||||
if( !zNewRecord ){
|
||||
@@ -2328,6 +2333,11 @@ case OP_MakeIdxKey: {
|
||||
nByte += sqlite3VarintLen(rowid);
|
||||
nByte++;
|
||||
}
|
||||
|
||||
if( nByte>MAX_BYTES_PER_ROW ){
|
||||
rc = SQLITE_TOOBIG;
|
||||
goto abort_due_to_error;
|
||||
}
|
||||
|
||||
/* Allocate space for the new key */
|
||||
zKey = (char *)sqliteMalloc(nByte);
|
||||
@@ -2832,7 +2842,7 @@ case OP_MoveTo: {
|
||||
pC->nullRow = 0;
|
||||
if( pC->intKey ){
|
||||
i64 iKey;
|
||||
assert( pTos->flags & MEM_Int );
|
||||
Integerify(pTos);
|
||||
iKey = intToKey(pTos->i);
|
||||
if( pOp->p2==0 && pOp->opcode==OP_MoveTo ){
|
||||
pC->movetoTarget = iKey;
|
||||
|
Reference in New Issue
Block a user