Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

change the return value to 'cookie' address from the current value ' 1 . Dump of assembler code for function getbuf: 0 x 5

change the return value to 'cookie' address from the current value '1".
Dump of assembler code for function getbuf:
0x565565f2+0>: push %ebp
0x565565f3+1>: mov %esp,%ebp
0x565565f5+3>: push %ebx
0x565565f6+4>: sub $0x24,%esp
0x565565f9+7>: call 0x565565ee __x86.get_pc_thunk.ax>
0x565565fe +12>: add $0x393e,%eax
0x56556603+17>: sub $0xc,%esp
0x56556606+20>: lea -0x28(%ebp),%edx
0x56556609+23>: push %edx
0x5655660a +24>: mov %eax,%ebx
0x5655660c +26>: call 0x56555fec
0x56556611+31>: add $0x10,%esp
0x56556614+34>: mov $0x1,%eax
0x56556619+39>: mov -0x4(%ebp),%ebx
0x5655661c +42>: leave
0x5655661d +43>: ret
End of assembler dump. and Dump of assembler code for function test:
0x56555df9+0>: push %ebp
0x56555dfa +1>: mov %esp,%ebp
0x56555dfc +3>: push %ebx
0x56555dfd +4>: sub $0x14,%esp
0x56555e00+7>: call 0x56555bf0__x86.get_pc_thunk.bx>
0x56555e05+12>: add $0x4137,%ebx
0x56555e0b +18>: call 0x5655634f
0x56555e10+23>: mov %eax,-0x10(%ebp)
0x56555e13+26>: call 0x565565f2
0x56555e18+31>: mov %eax,-0xc(%ebp)
0x56555e1b +34>: call 0x5655634f
0x56555e20+39>: mov %eax,%edx
0x56555e22+41>: mov -0x10(%ebp),%eax
0x56555e25+44>: cmp %eax,%edx
0x56555e27+46>: je 0x56555e3d
0x56555e29+48>: sub $0xc,%esp
0x56555e2c +51>: lea -0x259c(%ebx),%eax
0x56555e32+57>: push %eax
0x56555e33+58>: call 0x56555a50
0x56555e38+63>: add $0x10,%esp
0x56555e3b +66>: jmp 0x56555e83
0x56555e3d +68>: mov -0xc(%ebp),%edx
0x56555e40+71>: mov 0x1118(%ebx),%eax
0x56555e46+77>: cmp %eax,%edx
0x56555e48+79>: jne 0x56555e6e
0x56555e4a +81>: sub $0x8,%esp
0x56555e4d +84>: pushl -0xc(%ebp)
0x56555e50+87>: lea -0x2573(%ebx),%eax
0x56555e56+93>: push %eax
0x56555e57+94>: call 0x56555970
0x56555e5c +99>: add $0x10,%esp
0x56555e5f +102>: sub $0xc,%esp
0x56555e62+105>: push $0x3
0x56555e64+107>: call 0x565567e7
0x56555e69+112>: add $0x10,%esp
0x56555e6c +115>: jmp 0x56555e83
0x56555e6e +117>: sub $0x8,%esp
0x56555e71+120>: pushl -0xc(%ebp)
0x56555e74+123>: lea -0x2556(%ebx),%eax
0x56555e7a +129>: push %eax
0x56555e7b +130>: call 0x56555970
0x56555e80+135>: add $0x10,%esp
0x56555e83+138>: nop
0x56555e84+139>: mov -0x 4(%ebp),%ebx
0x56555e87+142>: leave
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions