diff --git a/pwnlib/shellcraft/templates/aarch64/memcpy.asm b/pwnlib/shellcraft/templates/aarch64/memcpy.asm index 8514ac6fd..468f0e339 100644 --- a/pwnlib/shellcraft/templates/aarch64/memcpy.asm +++ b/pwnlib/shellcraft/templates/aarch64/memcpy.asm @@ -16,4 +16,4 @@ ${memcpy_loop}: ldrb w3, [x1], #1 strb w3, [x0], #1 subs x2, x2, #1 - bge ${memcpy_loop} + bgt ${memcpy_loop} diff --git a/pwnlib/shellcraft/templates/arm/memcpy.asm b/pwnlib/shellcraft/templates/arm/memcpy.asm index 8c4b2d877..b6714c157 100644 --- a/pwnlib/shellcraft/templates/arm/memcpy.asm +++ b/pwnlib/shellcraft/templates/arm/memcpy.asm @@ -16,4 +16,4 @@ ${memcpy_loop}: ldrb r3, [r1], #1 strb r3, [r0], #1 subs r2, r2, #1 - bge ${memcpy_loop} + bgt ${memcpy_loop} diff --git a/pwnlib/shellcraft/templates/thumb/memcpy.asm b/pwnlib/shellcraft/templates/thumb/memcpy.asm index 250555c40..5f3ce2dc7 100644 --- a/pwnlib/shellcraft/templates/thumb/memcpy.asm +++ b/pwnlib/shellcraft/templates/thumb/memcpy.asm @@ -16,4 +16,4 @@ ${memcpy_loop}: ldrb r3, [r1], #1 strb r3, [r4], #1 subs r2, r2, #1 - bge ${memcpy_loop} + bgt ${memcpy_loop}