Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following code: #include #include #include #include int len(char *s) { return strlen(s); } void lptoa(char *s, long *p) { long val = *p; sprintf(s,%ld,val);

The following code:

#include  #include  #include  #include  int len(char *s) { return strlen(s); } void lptoa(char *s, long *p) { long val = *p; sprintf(s,"%ld",val); } long longlen(long x) { long v; char buf[8]; v = x; lptoa(buf,&v); return len(buf); } int main() { intlen(TMAX-1); } 

Compile the code with and without stack protector.image text in transcribed

Fill the table with appropriate values. Leave the entries empty if not applicable no stack protector stack protector gcc flag assembly for allocating stack stack size in decimal assembly for freeing stack assembly for allocating stack stack size in decimal assemblv for freeing stack "char *s" address relative to rsp after entering lptoa "long *p" address relative to rsp after entering lptoa "val" address relative to rsp after entering lptoa assembly for allocating stack stack size in decimal assembly for freeing stack x" address relative to rsp after entering longlen "v" address relative to rsp after entering longlen en oa nglen "buf" address relative to rsp after ent canary register name canary address relative to rsp canary value assembly for erasing canary value assembly for canary cross check Fill the table with appropriate values. Leave the entries empty if not applicable no stack protector stack protector gcc flag assembly for allocating stack stack size in decimal assembly for freeing stack assembly for allocating stack stack size in decimal assemblv for freeing stack "char *s" address relative to rsp after entering lptoa "long *p" address relative to rsp after entering lptoa "val" address relative to rsp after entering lptoa assembly for allocating stack stack size in decimal assembly for freeing stack x" address relative to rsp after entering longlen "v" address relative to rsp after entering longlen en oa nglen "buf" address relative to rsp after ent canary register name canary address relative to rsp canary value assembly for erasing canary value assembly for canary cross check

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

Real Time Database And Information Systems Research Advances

Authors: Azer Bestavros ,Victor Fay-Wolfe

1st Edition

1461377803, 978-1461377801

More Books

Students also viewed these Databases questions

Question

design a simple disciplinary and grievance procedure.

Answered: 1 week ago