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:
@ -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);
|
||||
|
Reference in New Issue
Block a user