MCPcopy Create free account
hub / github.com/F12FLASH/CTF / print_debug_info

Function print_debug_info

4.Stackless Stack/public/downloads/stackless_stack.c:137–151  ·  view source on GitHub ↗

* @brief Print memory layout and debug information * @param region Pointer to memory region */

Source from the content-addressed store, hash-verified

135 * @param region Pointer to memory region
136 */
137void print_debug_info(memory_region_t *region) {
138 char info_buffer[512];
139
140 int length = snprintf(info_buffer, sizeof(info_buffer),
141 "[🔍] Memory Layout Information:\n"
142 " • Region Address: %p\n"
143 " • Buffer Size: 0x%x bytes\n"
144 " • Callback Pointer: %p\n"
145 " • Magic Value: 0x%lx\n"
146 " • Win Function: %p\n\n",
147 region, BUFFER_SIZE, region->callback,
148 region->magic, win_function);
149
150 write(STDOUT_FILENO, info_buffer, length);
151}
152
153/**
154 * @brief Vulnerable function containing buffer overflow

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected