Skip to content

Commit f3d0a5e

Browse files
authored
Merge pull request #24 from shaymargolis/memcpy-size-one-is-working
test_memcpy, test_memset: Test len=1 and len=0
2 parents 80f8bce + f4b3a14 commit f3d0a5e

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,4 @@ sudo apt install gcc-9-mips-linux-gnu binutils-multiarch
107107

108108
## Known issues
109109

110-
### Memcpy
111-
112-
1. memcpy is not working for copylen=1
110+
Currently none!

tests/test_memcpy.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ def memcpy_get_shellcode(temp_dir_path, compiler_arch, memcpy_helper, copy_len):
6767
100,
6868
200,
6969
0x1000,
70+
0,
71+
1,
7072
2,
7173
3,
7274
100

tests/test_memset.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def memset_get_shellcode(temp_dir_path, compiler_arch, memset_helper, copy_bytes
6060
copy_bytes
6161
),
6262
],
63-
0x1000 * len(copy_bytes),
63+
0x1000,
6464
base_address=helper.shellcode_address
6565
)
6666

@@ -73,6 +73,8 @@ def memset_get_shellcode(temp_dir_path, compiler_arch, memset_helper, copy_bytes
7373
@pytest.mark.parametrize('copy_len', [
7474
100,
7575
200,
76+
0,
77+
1,
7678
2,
7779
3,
7880
8,

0 commit comments

Comments
 (0)