mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
Ensure that OOM conditions in the generation of the "bad JSON path" error
message result in an SQLITE_NOMEM error. FossilOrigin-Name: aa0e02b5c26a2ef3d6216a0ed8bc01382be43173485f898cb63f2a8c559f2e74
This commit is contained in:
@@ -2667,8 +2667,12 @@ static char *jsonBadPathError(
|
||||
){
|
||||
char *zMsg = sqlite3_mprintf("bad JSON path: %Q", zPath);
|
||||
if( ctx==0 ) return zMsg;
|
||||
sqlite3_result_error(ctx, zMsg, -1);
|
||||
sqlite3_free(zMsg);
|
||||
if( zMsg ){
|
||||
sqlite3_result_error(ctx, zMsg, -1);
|
||||
sqlite3_free(zMsg);
|
||||
}else{
|
||||
sqlite3_result_error_nomem(ctx);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user