Skip to content

Commit

Permalink
Fix last byte in returned match buffer being cut off
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanusz-r7 committed Dec 1, 2023
1 parent e588bad commit 3835d5d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ DWORD request_sys_process_memory_search(Remote* remote, Packet* packet)
const size_t current_match_length = min(max_match_length, match_length);

// Note: This raw data needs to be read from the buffer we copied. Trying to read it from mem.BaseAddress directly will make us crash.
met_api->packet.add_tlv_raw(search_results, TLV_TYPE_MEMORY_SEARCH_MATCH_STR, buffer + current_buffer_offset + result, (DWORD)current_match_length);
met_api->packet.add_tlv_raw(search_results, TLV_TYPE_MEMORY_SEARCH_MATCH_STR, buffer + current_buffer_offset + result, (DWORD)current_match_length + 1);

dprintf("[MEM SEARCH] Adding Match address");
met_api->packet.add_tlv_qword(search_results, TLV_TYPE_MEMORY_SEARCH_MATCH_ADDR, match_address);
Expand Down

0 comments on commit 3835d5d

Please sign in to comment.