From: drh Date: Sat, 22 Aug 2015 03:05:54 +0000 (+0000) Subject: Fix a couple instances of OOM handling in the json extension. X-Git-Tag: version-3.9.0~202 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be9474ee05fd36fa5925847d9aa6cac9a06f9ad3;p=thirdparty%2Fsqlite.git Fix a couple instances of OOM handling in the json extension. FossilOrigin-Name: 213a6c5ccbcfe4495d45e3608e99a6398751aeed --- diff --git a/ext/misc/json1.c b/ext/misc/json1.c index 66173482c4..ea456bfeac 100644 --- a/ext/misc/json1.c +++ b/ext/misc/json1.c @@ -587,6 +587,7 @@ static int jsonParseValue(JsonParse *pParse, u32 i){ if( x==(-2) && pParse->nNode==iThis+1 ) return j+1; return -1; } + if( pParse->oom ) return -1; if( pParse->aNode[pParse->nNode-1].eType!=JSON_STRING ) return -1; j = x; while( isspace(pParse->zJson[j]) ){ j++; } @@ -639,7 +640,7 @@ static int jsonParseValue(JsonParse *pParse, u32 i){ j++; } jsonParseAddNode(pParse, JSON_STRING, j+1-i, &pParse->zJson[i]); - pParse->aNode[pParse->nNode-1].jnFlags = jnFlags; + if( !pParse->oom ) pParse->aNode[pParse->nNode-1].jnFlags = jnFlags; return j+1; }else if( c=='n' && strncmp(pParse->zJson+i,"null",4)==0 diff --git a/manifest b/manifest index ab5e94e7a0..de7c994cbe 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Do\snot\sapply\sthe\sWHERE-clause\spushdown\soptimization\sto\sterms\sthat\soriginate\nin\sthe\sON\sor\sUSING\sclause\sof\sa\sLEFT\sJOIN.\s\sFix\sfor\sticket\n[6df18e949d3676290]. -D 2015-08-22T01:32:29.479 +C Fix\sa\scouple\sinstances\sof\sOOM\shandling\sin\sthe\sjson\sextension. +D 2015-08-22T03:05:54.585 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in e2218eb228374422969de7b1680eda6864affcef F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -192,7 +192,7 @@ F ext/misc/eval.c f971962e92ebb8b0a4e6b62949463ee454d88fa2 F ext/misc/fileio.c d4171c815d6543a9edef8308aab2951413cd8d0f F ext/misc/fuzzer.c 4c84635c71c26cfa7c2e5848cf49fe2d2cfcd767 F ext/misc/ieee754.c b0362167289170627659e84173f5d2e8fee8566e -F ext/misc/json1.c f83f02ec4d7cc18794bd7ac046f1bb5905805b44 +F ext/misc/json1.c 2eae688e07700b94ed7e03051a90918c6744d0a9 F ext/misc/nextchar.c 35c8b8baacb96d92abbb34a83a997b797075b342 F ext/misc/percentile.c bcbee3c061b884eccb80e21651daaae8e1e43c63 F ext/misc/regexp.c af92cdaa5058fcec1451e49becc7ba44dba023dc @@ -1378,7 +1378,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 178f9a352c6c9e15e809e1a47530c6592d18578d -R 3f8fa8b32979f76f9659e6c12a12d079 +P 351bc22fa9b5a2e50da3583a882c5aa390bda19f +R ca8b5b15c77432f02507718e8d7e076f U drh -Z fe48d12321db6aa71a1dc8fdceeea2c3 +Z d373dd42adbb610fe45611bf2ca7212e diff --git a/manifest.uuid b/manifest.uuid index 661f57a8ab..4064ce58f6 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -351bc22fa9b5a2e50da3583a882c5aa390bda19f \ No newline at end of file +213a6c5ccbcfe4495d45e3608e99a6398751aeed \ No newline at end of file