Question: Question 1 : Explain the effect on the stack as the following code executes. Be sure to communicate what is happening and what will happen
Question : Explain the effect on the stack as the following code executes. Be
sure to communicate what is happening and what will happen when the strcpy
occurs. Use the following C code to depict the stackheap like the slides in
the buffer overflow teaching materials. point
int main think of main like P
int returnedvalue.
In C a function can return values
Now you are passing a string into buffered
the function buffered returns a value
returnedvalue buffered ;
think of bof as Q; do not forget your parameters
int buffered char str
char mybuffer ;
strcpy mybuffer str;
return ;
Answer:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
