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 authored and Mathias Svensson committed Feb 17, 2017
1 parent b6cfec6 commit e021f57
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 @@ -478,7 +478,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 e021f57

Please sign in to comment.