diff options
author | drh <drh@noemail.net> | 2015-09-10 19:22:25 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-09-10 19:22:25 +0000 |
commit | 0b19c96935b38bb47ffac79a63f3507611e99ca3 (patch) | |
tree | 14594a344337f1f8b58c66e16ddfe277691d0c3a /src | |
parent | 33c47f565cd80b9c0a94b47bbdd794393cc158fe (diff) | |
download | sqlite-0b19c96935b38bb47ffac79a63f3507611e99ca3.tar.gz sqlite-0b19c96935b38bb47ffac79a63f3507611e99ca3.zip |
Fix a potential NULL pointer deref in the testing logic of pcache1.
NB: The -DSQLITE_TEST compile-time option is needed to hit the problem.
FossilOrigin-Name: f5580f08538636ffb1367e717a33756288ccddde
Diffstat (limited to 'src')
-rw-r--r-- | src/pcache1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pcache1.c b/src/pcache1.c index 1beb66d73..00a0205f5 100644 --- a/src/pcache1.c +++ b/src/pcache1.c @@ -1223,7 +1223,7 @@ void sqlite3PcacheStats( ){ PgHdr1 *p; int nRecyclable = 0; - for(p=pcache1.grp.lru.pLruNext; !p->isAnchor; p=p->pLruNext){ + for(p=pcache1.grp.lru.pLruNext; p && !p->isAnchor; p=p->pLruNext){ assert( p->isPinned==0 ); nRecyclable++; } |