mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Avoid invoking sqlite3Atoi64() will a null pointer following an error
from ExpandBlob(). FossilOrigin-Name: 780412f2ca7576ce90861b2bd499f953504125b200e9aeae685def4a943f9d2b
This commit is contained in:
@@ -433,7 +433,10 @@ static u16 SQLITE_NOINLINE computeNumericType(Mem *pMem){
|
||||
sqlite3_int64 ix;
|
||||
assert( (pMem->flags & (MEM_Int|MEM_Real|MEM_IntReal))==0 );
|
||||
assert( (pMem->flags & (MEM_Str|MEM_Blob))!=0 );
|
||||
ExpandBlob(pMem);
|
||||
if( ExpandBlob(pMem) ){
|
||||
pMem->u.i = 0;
|
||||
return MEM_Int;
|
||||
}
|
||||
rc = sqlite3AtoF(pMem->z, &pMem->u.r, pMem->n, pMem->enc);
|
||||
if( rc<=0 ){
|
||||
if( rc==0 && sqlite3Atoi64(pMem->z, &ix, pMem->n, pMem->enc)<=1 ){
|
||||
|
Reference in New Issue
Block a user