Fix an uninitialized variable in the Prev and Next opcodes. (CVS 4873)

FossilOrigin-Name: fcf3d0a3d5d3a71155ab0aa5f533da72063d54f0
This commit is contained in:
drh 2008-03-17 17:18:37 +00:00
parent a53b914086
commit 6c44ea48b8
3 changed files with 10 additions and 12 deletions

View File

@ -1,5 +1,5 @@
C Abandon\sthe\sOR\soptimization\sfollowing\sa\smemory\sallocation\sfailure,\nto\savoid\sreferencing\suninitialized\smemory.\s(CVS\s4872)
D 2008-03-17T17:08:33
C Fix\san\suninitialized\svariable\sin\sthe\sPrev\sand\sNext\sopcodes.\s(CVS\s4873)
D 2008-03-17T17:18:38
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
F Makefile.in 5be94fea84f1599672e5041de03b97990baca593
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -174,7 +174,7 @@ F src/update.c 9b3be169cd2a0b065717164aa0f90aa48f34aed1
F src/utf.c 32b00d6e19010025e58f2ecb2f921d5e126771b4
F src/util.c c56e41ed4769c1f2b8af9ffde4757a7b4fb08ed1
F src/vacuum.c 3f34f278809bf3eb0b62ec46ff779e9c385b28f0
F src/vdbe.c abb9232dbb05a53cce997aa95e67587d8d95729e
F src/vdbe.c c63fcb1c1259e59477f1312e0a868d148f23a148
F src/vdbe.h 58a7d931ffb704e034b2a725981cfa5bd406fad9
F src/vdbeInt.h 76c81d057a39813de0fda3cad1498655d53ec69d
F src/vdbeapi.c cf9fc963efae3cdf5de08e2a9718b487059c7fc5
@ -623,7 +623,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
P 57db14067ff7d519291bebe695dcf991a9462372
R 699373a396df6a54fc588940387e885f
P 9d2afbb543e1493e1d9c2eb4329143bcb1ceca19
R 1dda9680613a1b8479a4668dc28f14c0
U drh
Z c0e8c93c30926c71487668b2f03cf719
Z c240c67cd455ae78b089e0da9905a979

View File

@ -1 +1 @@
9d2afbb543e1493e1d9c2eb4329143bcb1ceca19
fcf3d0a3d5d3a71155ab0aa5f533da72063d54f0

View 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.710 2008/03/17 16:54:02 drh Exp $
** $Id: vdbe.c,v 1.711 2008/03/17 17:18:38 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@ -3575,7 +3575,6 @@ case OP_Prev: /* jump */
case OP_Next: { /* jump */
Cursor *pC;
BtCursor *pCrsr;
int res;
CHECK_FOR_INTERRUPT;
assert( pOp->p1>=0 && pOp->p1<p->nCursor );
@ -3585,9 +3584,8 @@ case OP_Next: { /* jump */
}
pCrsr = pC->pCursor;
assert( pCrsr );
if( pC->nullRow ){
res = 1;
}else{
if( pC->nullRow==0 ){
int res = 1;
assert( pC->deferredMoveto==0 );
rc = pOp->opcode==OP_Next ? sqlite3BtreeNext(pCrsr, &res) :
sqlite3BtreePrevious(pCrsr, &res);