Skip to content

Regarding w1, project1 Question explanation. #2

@ritwik-20198

Description

@ritwik-20198

Q.What input do you provide to the program so that ptrs[s] reads (and then tries to execute) the contents of local variable p instead of a function pointer stored in the buffer pointed to by ptrs? You can determine the answer by performing a little arithmetic on the addresses you have already gathered above -- be careful that you take into account the size of a pointer when doing pointer arithmetic. If successful, you will end up executing the pat_on_back function. Enter your answer as an unsigned integer.

your Solution:
(p-ptrs)/4 is
print /x (0xbffff534 - 0x804a0d4)/4
0x2dfed518 or 771675416

** can you please explain this, how did you do this??
wisdom-alt code.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions