Skip to content

Commit e021f57

Browse files
kristoff3rMathias Svensson
authored andcommitted
Fixed bug in generatePadding (issue #891)
1 parent b6cfec6 commit e021f57

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pwnlib/rop/rop.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,9 @@ def generatePadding(self, offset, count):
478478
"""
479479
Generates padding to be inserted into the ROP stack.
480480
"""
481-
return cyclic.cyclic(offset + count)[-count:]
481+
if count:
482+
return cyclic.cyclic(offset + count)[-count:]
483+
return ''
482484

483485
def describe(self, object):
484486
"""

0 commit comments

Comments
 (0)