Skip to content

Commit

Permalink
add is_range_mapped
Browse files Browse the repository at this point in the history
  • Loading branch information
smx-smx committed Apr 7, 2024
1 parent 4666a41 commit 57dd13b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions xzre.h
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,16 @@ extern BOOL chacha_decrypt(
*/
extern BOOL secret_data_get_decrypted(u8 *output, global_context_t *ctx);

/**
* @brief verify if a memory range is mapped
*
* @param addr the start address
* @param length the length of the range to check
* @param ctx a structure with a libc_import_t field at offset 0x10
* @return BOOL TRUE if the whole range is mapped, FALSE otherwise
*/
extern BOOL is_range_mapped(u8* addr, u8 length, global_context_t* ctx);

extern global_context_t *global_ctx;

#include "util.h"
Expand Down
3 changes: 3 additions & 0 deletions xzre.lds
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ SECTIONS {

"secret_data_get_decrypted" = ".";
*(.text.parse_lzma10);

"is_range_mapped" = ".";
*(.text.hc_find_funa);
}
} INSERT AFTER .text;

Expand Down

0 comments on commit 57dd13b

Please sign in to comment.