-C Make\ssure\sthe\sIN\soperator\sworks\swith\szeroblobs.\sTicket\s#3965.\nOther\ssimplifications\sassociated\swith\sstructural\stesting.\s(CVS\s6890)
-D 2009-07-14T02:33:02
+C Simplifications\sand\stweaks\sto\svdbeaux.c\sresulting\sfrom\sstructural\stesting.\s(CVS\s6891)
+D 2009-07-14T14:15:27
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/vdbe.h 35a648bc3279a120da24f34d9a25213ec15daf8a
F src/vdbeInt.h 831c254a6eef237ef4664c8381a0137586567007
F src/vdbeapi.c 0ab8ada7260b32031ca97f338caecf0812460624
-F src/vdbeaux.c 17b354bc801098c0c39d6bee6efe629447fa5d68
+F src/vdbeaux.c 5b3cacb685143ebe8ec8660a4dde08a8a45082ce
F src/vdbeblob.c a3f3e0e877fc64ea50165eec2855f5ada4477611
F src/vdbemem.c 1618f685d19b4bcc96e40b3c478487bafd2ae246
F src/vtab.c 00902f289521041712fb0293d0bf8688c7af8e48
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
-P 1c2bfc43a4fd5b779a3b5b5b8ca5b41cb7250b5a
-R 5b29579da257bf626ba86a77cdfd950e
+P 25dd342283046aaf66a679348ef1c7364c616402
+R f6226eddfcb83024fda164220a139368
U drh
-Z f2dc33c5921003d4457094dd4509cc09
+Z 435b93aa97c763959298279012931682
-25dd342283046aaf66a679348ef1c7364c616402
\ No newline at end of file
+fa49666fb913f0d82e84bdfa2af3a294be04e47c
\ No newline at end of file
** to version 2.8.7, all this code was combined into the vdbe.c source file.
** But that file was getting too big so this subroutines were split out.
**
-** $Id: vdbeaux.c,v 1.472 2009/07/14 02:33:02 drh Exp $
+** $Id: vdbeaux.c,v 1.473 2009/07/14 14:15:27 drh Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"
u32 serial_type;
idx += getVarint32(&aKey[idx], serial_type);
- if( d>=nKey && sqlite3VdbeSerialTypeLen(serial_type)>0 ) break;
+ assert( d+sqlite3VdbeSerialTypeLen(serial_type) <= nKey );
pMem->enc = pKeyInfo->enc;
pMem->db = pKeyInfo->db;
pMem->flags = 0;
}
i++;
}
- if( mem1.zMalloc ) sqlite3VdbeMemRelease(&mem1);
+
+ /* No memory allocation is ever used on mem1. */
+ if( NEVER(mem1.zMalloc) ) sqlite3VdbeMemRelease(&mem1);
/* If the PREFIX_SEARCH flag is set and all fields except the final
** rowid field were equal, then clear the PREFIX_SEARCH flag and set
Mem m;
sqlite3BtreeKeySize(pCur, &nCellKey);
- if( nCellKey<=0 || nCellKey>0x7fffffff ){
+ /* nCellKey will always be between 0 and 0xffffffff because of the say
+ ** that btreeParseCellPtr() and sqlite3GetVarint32() are implemented */
+ if( NEVER(nCellKey<=0) || nCellKey>0x7fffffff ){
*res = 0;
- return SQLITE_OK;
+ return SQLITE_CORRUPT;
}
m.db = 0;
m.flags = 0;