This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
token/program-2022/src/extension Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -874,6 +874,8 @@ fn process_withdraw_withheld_tokens_from_mint(
874
874
let authority_info = next_account_info ( account_info_iter) ?;
875
875
let authority_info_data_len = authority_info. data_len ( ) ;
876
876
877
+ // unnecessary check, but helps for clarity
878
+ check_program_account ( mint_account_info. owner ) ?;
877
879
let mut mint_data = mint_account_info. data . borrow_mut ( ) ;
878
880
let mut mint = StateWithExtensionsMut :: < Mint > :: unpack ( & mut mint_data) ?;
879
881
@@ -969,6 +971,8 @@ fn process_withdraw_withheld_tokens_from_accounts(
969
971
. len ( )
970
972
. saturating_sub ( num_token_accounts as usize ) ;
971
973
974
+ // unnecessary check, but helps for clarity
975
+ check_program_account ( mint_account_info. owner ) ?;
972
976
let mut mint_data = mint_account_info. data . borrow_mut ( ) ;
973
977
let mut mint = StateWithExtensionsMut :: < Mint > :: unpack ( & mut mint_data) ?;
974
978
Original file line number Diff line number Diff line change @@ -119,6 +119,9 @@ fn process_withdraw_withheld_tokens_from_mint(
119
119
let authority_info = next_account_info ( account_info_iter) ?;
120
120
let authority_info_data_len = authority_info. data_len ( ) ;
121
121
122
+ // unnecessary check, but helps for clarity
123
+ check_program_account ( mint_account_info. owner ) ?;
124
+
122
125
let mut mint_data = mint_account_info. data . borrow_mut ( ) ;
123
126
let mut mint = StateWithExtensionsMut :: < Mint > :: unpack ( & mut mint_data) ?;
124
127
let extension = mint. get_extension_mut :: < TransferFeeConfig > ( ) ?;
@@ -214,6 +217,9 @@ fn process_withdraw_withheld_tokens_from_accounts(
214
217
. len ( )
215
218
. saturating_sub ( num_token_accounts as usize ) ;
216
219
220
+ // unnecessary check, but helps for clarity
221
+ check_program_account ( mint_account_info. owner ) ?;
222
+
217
223
let mint_data = mint_account_info. data . borrow ( ) ;
218
224
let mint = StateWithExtensions :: < Mint > :: unpack ( & mint_data) ?;
219
225
let extension = mint. get_extension :: < TransferFeeConfig > ( ) ?;
You can’t perform that action at this time.
0 commit comments