mirror of
https://github.com/Decscots/Lockpick_RCM.git
synced 2025-06-22 00:47:18 +02:00
nx_savedata: Ensure heap safety
This commit is contained in:
parent
1b5a7bb302
commit
1e87828db4
4 changed files with 59 additions and 28 deletions
|
@ -102,7 +102,7 @@ uint32_t save_remap_storage_read(remap_storage_ctx_t *ctx, void *buffer, uint64_
|
|||
}
|
||||
uint64_t in_pos = offset;
|
||||
uint32_t out_pos = 0;
|
||||
uint32_t remaining = count;
|
||||
uint32_t remaining = (u32)count;
|
||||
|
||||
while (remaining) {
|
||||
uint64_t entry_pos = in_pos - entry->entry.virtual_offset;
|
||||
|
@ -135,7 +135,7 @@ uint32_t save_remap_storage_write(remap_storage_ctx_t *ctx, const void *buffer,
|
|||
}
|
||||
uint64_t in_pos = offset;
|
||||
uint32_t out_pos = 0;
|
||||
uint32_t remaining = count;
|
||||
uint32_t remaining = (u32)count;
|
||||
|
||||
while (remaining) {
|
||||
uint64_t entry_pos = in_pos - entry->entry.virtual_offset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue