Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@
}

printf("overwrite canary:\n");
/* TODO 1: Add code that overwrites the canary. */
addr[6] = 0;
/* TODO 1: Add code that overwrites the canary.
* Note: You should get a stack smashing detected error.
* Remove the overwrite after getting the error in order to proceed to the next step.
*/

Check failure on line 25 in chapters/data/memory-security/drills/tasks/bypassing-stack-protector/solution/src/stack_protector.c

View workflow job for this annotation

GitHub Actions / Checkpatch

WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line
addr[1] = 0;

printf("overwrite return address:\n");
/* TODO 2: Add code that overwrites the return address with the address of pawned. */
addr[7] = &pawned;
addr[3] = &pawned;

(void) p;
}
Expand Down
Loading