From 8552efd74a7b50afc87b536451e6e86125f1c19a Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Mon, 18 Dec 2023 22:21:30 -0700 Subject: fix spelling --- docs/posts/2023-10-04-bomb-lab.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/posts/2023-10-04-bomb-lab.html') diff --git a/docs/posts/2023-10-04-bomb-lab.html b/docs/posts/2023-10-04-bomb-lab.html index aae2d2d..4414f04 100644 --- a/docs/posts/2023-10-04-bomb-lab.html +++ b/docs/posts/2023-10-04-bomb-lab.html @@ -176,7 +176,7 @@ End of assembler <

By executing mov %rsp,%rbp we are setting the base pointer (%rbp) to point to this address.

-

Now, for the second instruction mov $0x1,%ebx, we are initalising the %ebx register with the value 1. Based on the assembly code, you can see that this is being used as a counter/index for the loop.

+

Now, for the second instruction mov $0x1,%ebx, we are initialising the %ebx register with the value 1. Based on the assembly code, you can see that this is being used as a counter/index for the loop.

   0x000055555555560b <+32>:    jmp    0x555555555620 <phase_2+53>
@@ -213,7 +213,7 @@ End of assembler <
 
-

Here, we can see that the program increments %ebx by 1, adds a 4 byte offset to %rbp (the number we will be matching now), and checks if %ebx is equal to 6. If it is, it breaks the loop and jumps to <phase_2+70> succesfully finishing this stage.

+

Here, we can see that the program increments %ebx by 1, adds a 4 byte offset to %rbp (the number we will be matching now), and checks if %ebx is equal to 6. If it is, it breaks the loop and jumps to <phase_2+70> successfully finishing this stage.

Now, given that we know the first two numbers in the sequence are 0 1, we can calculate the other numbers by following the pattern of adding the counter and the value of the previous number.

@@ -423,7 +423,7 @@ Dump of assembler

The program checks whether scanf returns a value <= 2, if it does then it calls the explode_bomb function.

-

Note: scanf returns the number of fields that were succesfully converted and assigned

+

Note: scanf returns the number of fields that were successfully converted and assigned

   0x0000555555555665 <+45>:    cmpl   $0x7,0xc(%rsp)
-- 
cgit v1.2.3