Skip to content

Commit 132d74c

Browse files
author
Rooter
committed
Check reserve is owned by lending market
1 parent 871935c commit 132d74c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

token-lending/program/src/processor.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,6 +1995,10 @@ fn process_update_reserve_config(
19951995
);
19961996
return Err(LendingError::InvalidAccountOwner.into());
19971997
}
1998+
if &reserve.lending_market != lending_market_info.key {
1999+
msg!("Reserve lending market does not match the lending market provided");
2000+
return Err(LendingError::InvalidAccountInput.into());
2001+
}
19982002

19992003
let lending_market = LendingMarket::unpack(&lending_market_info.data.borrow())?;
20002004
if lending_market_info.owner != program_id {

0 commit comments

Comments
 (0)