1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix a potential memory leak in RBU if the rbu_fossil_delta() SQL function is

misused.  Misuse never happens in a working RBU system, so this is not a 
particularly important fix.

FossilOrigin-Name: 12517d1b15da46bc90bd95bb9c161d7f2ecdd7f28b1b3a5ed4397939ef986061
This commit is contained in:
drh
2019-02-19 17:45:31 +00:00
parent 12fe9a0d25
commit 6d7f18d60c
3 changed files with 8 additions and 7 deletions

View File

@ -684,6 +684,7 @@ static void rbuFossilDeltaFunc(
}else{
nOut2 = rbuDeltaApply(aOrig, nOrig, aDelta, nDelta, aOut);
if( nOut2!=nOut ){
sqlite3_free(aOut);
sqlite3_result_error(context, "corrupt fossil delta", -1);
}else{
sqlite3_result_blob(context, aOut, nOut, sqlite3_free);