1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Fix a possible NULL pointer dereference in following an OOM error

in sqlite3ExprIsInteger(). Problem found by OSS-Fuzz.

FossilOrigin-Name: 5ec655e8e817c1ed3bfb2e576745a7cef441494ad7baf1bf9f8895e98ac19c5a
This commit is contained in:
drh
2017-03-12 20:28:44 +00:00
parent 1ed1e616f7
commit ba28b5ab0a
3 changed files with 8 additions and 7 deletions

View File

@@ -1860,6 +1860,7 @@ int sqlite3ExprContainsSubquery(Expr *p){
*/
int sqlite3ExprIsInteger(Expr *p, int *pValue){
int rc = 0;
if( p==0 ) return 0; /* Can only happen following on OOM */
/* If an expression is an integer literal that fits in a signed 32-bit
** integer, then the EP_IntValue flag will have already been set */