Skip to content

Commit 92d8fdb

Browse files
authored
Merge pull request solana-labs#41 from solendprotocol/rooter/config-fix
Check reserve is owned by lending market
2 parents c570b02 + 132d74c commit 92d8fdb

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
@@ -1962,6 +1962,10 @@ fn process_update_reserve_config(
19621962
);
19631963
return Err(LendingError::InvalidAccountOwner.into());
19641964
}
1965+
if &reserve.lending_market != lending_market_info.key {
1966+
msg!("Reserve lending market does not match the lending market provided");
1967+
return Err(LendingError::InvalidAccountInput.into());
1968+
}
19651969

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

0 commit comments

Comments
 (0)