Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Draw a picture showing the stack and the heap. For the stack and the heap, your picture should show (a) the memory addresses of each
Draw a picture showing the stack and the heap. For the stack and the heap, your picture should show (a) the memory addresses of each item in the stack/heap, (b) the name of the C variable for that item, and (c) the value in that memory. Include a screenshot of your programs output to help us check your answer.
Code is in https://github.com/hvtuananh/format_string/blob/master/vul_prog.c
show step and picture!
user input's address is int_input's address is The variable secret's address is 0xbffff320 (on stack) 0xbffff328 (on stack) Oxbffff324 (on stack) secret[0]'s address is secret[1]'s address is Please enter a string $s$s Please enter a decimal integer oxo804bo08 (on heap) 0x0804b0oc (on heap) $s$s original secrets: 0x44, 0x55 New secrets: 0x44, 0x55 user input's address is int_input's address is The variable secret's address is 0xbffff320 (on stack) 0xbffff328 (on stack) Oxbffff324 (on stack) secret[0]'s address is secret[1]'s address is Please enter a string $s$s Please enter a decimal integer oxo804bo08 (on heap) 0x0804b0oc (on heap) $s$s original secrets: 0x44, 0x55 New secrets: 0x44, 0x55Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started