1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Fix an uninitialized variable reference in the text generator

for "PRAGMA vdbe_trace=ON" output.
Problem discovered by OSS-Fuzz.

FossilOrigin-Name: e3d487162d1596ce125644f754ed9531ef4412f31f6837c3e31b7542b90602fe
This commit is contained in:
drh
2017-03-16 13:30:58 +00:00
parent 970ea372c4
commit 85c2dc0ae6
3 changed files with 9 additions and 13 deletions

View File

@@ -403,9 +403,7 @@ void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf){
}else{
c = 's';
}
sqlite3_snprintf(100, zCsr, "%c", c);
zCsr += sqlite3Strlen30(zCsr);
*(zCsr++) = c;
sqlite3_snprintf(100, zCsr, "%d[", pMem->n);
zCsr += sqlite3Strlen30(zCsr);
for(i=0; i<16 && i<pMem->n; i++){
@@ -417,9 +415,7 @@ void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf){
if( z<32 || z>126 ) *zCsr++ = '.';
else *zCsr++ = z;
}
sqlite3_snprintf(100, zCsr, "]%s", encnames[pMem->enc]);
zCsr += sqlite3Strlen30(zCsr);
*(zCsr++) = ']';
if( f & MEM_Zero ){
sqlite3_snprintf(100, zCsr,"+%dz",pMem->u.nZero);
zCsr += sqlite3Strlen30(zCsr);