diff options
author | drh <> | 2022-07-10 21:12:54 +0000 |
---|---|---|
committer | drh <> | 2022-07-10 21:12:54 +0000 |
commit | 25bb72a7a8dd1abad5edab3fe31ad3a6c96af69a (patch) | |
tree | 340a7f3fde47363282f40e30ed32288ad7fe50e3 /src/malloc.c | |
parent | 74879e137dbece78055a6c1a356a7d81f5b34f18 (diff) | |
download | sqlite-25bb72a7a8dd1abad5edab3fe31ad3a6c96af69a.tar.gz sqlite-25bb72a7a8dd1abad5edab3fe31ad3a6c96af69a.zip |
When an OOM occurs and sets the Parse.nErr value, also set the Parse.nErr
value for all outer Parse objects.
dbsqlfuzz d33f60aaa67733aa700cd69dacf8e0e23a327a29
FossilOrigin-Name: 9a494d25944f4f640026e7a7ae2948e555d7af31487c55ed2ec2818a0789b887
Diffstat (limited to 'src/malloc.c')
-rw-r--r-- | src/malloc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/malloc.c b/src/malloc.c index cfda60a0b..c508bf752 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -776,8 +776,13 @@ void *sqlite3OomFault(sqlite3 *db){ } DisableLookaside; if( db->pParse ){ + Parse *pParse; sqlite3ErrorMsg(db->pParse, "out of memory"); db->pParse->rc = SQLITE_NOMEM_BKPT; + for(pParse=db->pParse->pOuterParse; pParse; pParse = pParse->pOuterParse){ + pParse->nErr++; + pParse->rc = SQLITE_NOMEM; + } } } return 0; |