Skip to content

Commit

Permalink
Fixed bug in generatePadding (issue #891)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristoff3r committed Feb 13, 2017
1 parent 3b07dfe commit 8b8a50b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pwnlib/rop/rop.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,9 @@ def generatePadding(self, offset, count):
"""
Generates padding to be inserted into the ROP stack.
"""
return cyclic.cyclic(offset + count)[-count:]
if count:
return cyclic.cyclic(offset + count)[-count:]
return ''

def describe(self, object):
"""
Expand Down

0 comments on commit 8b8a50b

Please sign in to comment.