summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfaissaloo <faissaloo@gmail.com>2016-06-21 21:04:45 +0100
committerfaissaloo <faissaloo@gmail.com>2016-06-21 21:04:45 +0100
commitd6f8317ebfbfdc2a5e492fcc5023dd320e41569a (patch)
treeaeebe25005adb5ca1c13827ef918136aa6a43c82
parent946aadad12b4b095dce1ba67d824bf7750101134 (diff)
downloaddbsh-d6f8317ebfbfdc2a5e492fcc5023dd320e41569a.tar.gz
Fixed bug where string length was being overwritten
-rwxr-xr-xshbin3872 -> 3904 bytes
-rw-r--r--sh.asm7
-rw-r--r--sh.obin4176 -> 4192 bytes
3 files changed, 6 insertions, 1 deletions
diff --git a/sh b/sh
index 7644a0b..32fb4c7 100755
--- a/sh
+++ b/sh
Binary files differ
diff --git a/sh.asm b/sh.asm
index e50d941..cdebb94 100644
--- a/sh.asm
+++ b/sh.asm
@@ -13,7 +13,7 @@ section .data
;Indicates that a file can be accessed in the way specified
F_OK equ 0x0
-
+
;option for waitid
P_PGID equ 2
;Syscall constants
@@ -99,6 +99,8 @@ _exec:
;waits for the process to close
_wait_for_proc:
+ mov r12, r10 ;backup
+
mov rsi, rax
mov rax, sys_waitid
mov rdi, 0
@@ -107,6 +109,9 @@ _wait_for_proc:
xor r8, r8
syscall
+ mov r10, r12 ;restore
+ ;mov r10,30
+
mov dword [cpid], -0x1
jmp _rloop
diff --git a/sh.o b/sh.o
index 0638b78..ff0858c 100644
--- a/sh.o
+++ b/sh.o
Binary files differ