Clean up pointer misuse in vdbe.c. (CVS 3078)
FossilOrigin-Name: 9e82b927490bc152f61c4ee3e95b6d08ea16c858
This commit is contained in:
parent
12f5e2018d
commit
0ac0719087
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Minor\stest\sfile\smodifications\sfor\sbuilds\scompiled\swith\sOMIT\soptions.\s(CVS\s3077)
|
||||
D 2006-02-10T13:33:31
|
||||
C Clean\sup\spointer\smisuse\sin\svdbe.c.\s(CVS\s3078)
|
||||
D 2006-02-10T14:02:07
|
||||
F Makefile.in 5d8dff443383918b700e495de42ec65bc1c8865b
|
||||
F Makefile.linux-gcc 74ba0eadf88748a9ce3fd03d2a3ede2e6715baec
|
||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||
@ -89,7 +89,7 @@ F src/update.c 050a7e0ddaac03dec5271712eee62f1a9e699049
|
||||
F src/utf.c 1199766bbb0157931a83aa6eede6b6381177be64
|
||||
F src/util.c 405f46fef062b476826d2c171ec21def29563b75
|
||||
F src/vacuum.c 3865673cc66acd0717ecd517f6b8fdb2a5e7924b
|
||||
F src/vdbe.c c92d7a4d3476136b8ab440f1e0547fab24112b34
|
||||
F src/vdbe.c 0a7fd81609429bae2b3c326687b02a60a9c01c49
|
||||
F src/vdbe.h 80ba1c391ec28180dd07a630577f50b22c2062da
|
||||
F src/vdbeInt.h eb3f86ab08ef11635bc78eb88c3ff13f923c233b
|
||||
F src/vdbeapi.c 7dc662e7c905ce666bb506dced932e0307115cbf
|
||||
@ -352,7 +352,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
|
||||
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
||||
P 84c2a5c4d753d1e39136ac7e80ac816442af0a49
|
||||
R 3b5f77c65783323e18ca74eb7ebf8d91
|
||||
U danielk1977
|
||||
Z ad1ff9bbe1c59dd9d2009c7724c25ca8
|
||||
P c468aa349db4e6571711bf94781b88aa3c811d03
|
||||
R 51d8d35bd9f658825f6805cd6b33762d
|
||||
U drh
|
||||
Z dc1199c71c73b605a01499c9907f4b4c
|
||||
|
@ -1 +1 @@
|
||||
c468aa349db4e6571711bf94781b88aa3c811d03
|
||||
9e82b927490bc152f61c4ee3e95b6d08ea16c858
|
10
src/vdbe.c
10
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.542 2006/02/09 22:13:42 drh Exp $
|
||||
** $Id: vdbe.c,v 1.543 2006/02/10 14:02:07 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@ -1987,6 +1987,7 @@ case OP_Column: {
|
||||
u8 *zIdx; /* Index into header */
|
||||
u8 *zEndHdr; /* Pointer to first byte after the header */
|
||||
u32 offset; /* Offset into the data */
|
||||
int szHdrSz; /* Size of the header size field at start of record */
|
||||
int avail; /* Number of bytes of available data */
|
||||
if( pC && pC->aType ){
|
||||
aType = pC->aType;
|
||||
@ -2019,7 +2020,8 @@ case OP_Column: {
|
||||
pC->aRow = 0;
|
||||
}
|
||||
}
|
||||
zIdx = (u8 *)GetVarint((u8*)zData, offset);
|
||||
assert( zRec!=0 || avail>=payloadSize || avail>=9 );
|
||||
szHdrSz = GetVarint((u8*)zData, offset);
|
||||
|
||||
/* The KeyFetch() or DataFetch() above are fast and will get the entire
|
||||
** record header in most cases. But they will fail to get the complete
|
||||
@ -2034,8 +2036,8 @@ case OP_Column: {
|
||||
}
|
||||
zData = sMem.z;
|
||||
}
|
||||
zEndHdr = (u8 *)zData + offset;
|
||||
zIdx = (u8 *)zData + (int)zIdx;
|
||||
zEndHdr = (u8 *)&zData[offset];
|
||||
zIdx = (u8 *)&zData[szHdrSz];
|
||||
|
||||
/* Scan the header and use it to fill in the aType[] and aOffset[]
|
||||
** arrays. aType[i] will contain the type integer for the i-th
|
||||
|
Loading…
x
Reference in New Issue
Block a user