Skip to content

Commit

Permalink
Merge pull request #1620 from CounterpartyXCP/hotfix
Browse files Browse the repository at this point in the history
HOTFIX IndexError
  • Loading branch information
adamkrellenstein authored Apr 10, 2024
2 parents c7690e6 + c297e91 commit 2173d10
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions counterparty-lib/counterpartylib/lib/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from counterpartylib.lib import config
from counterpartylib.lib import script
from counterpartylib.lib import ledger
from counterpartylib.lib import exceptions

logger = logging.getLogger(config.LOGGER_NAME)

Expand Down Expand Up @@ -53,6 +54,9 @@ def unpack(short_address_bytes):
"""
from .ledger import enabled # Here to account for test mock changes

if short_address_bytes == b'':
raise exceptions.UnpackError

if enabled('segwit_support') and short_address_bytes[0] >= 0x80 and short_address_bytes[0] <= 0x8F:
# we have a segwit address here
witver = short_address_bytes[0] - 0x80
Expand Down
9 changes: 9 additions & 0 deletions release-notes/release-notes-v10.0.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Release Notes - Counterparty Core v10.0.1 (2024-04-09)

# ChangeLog

## Stability and Correctness
* Add missing sanity check in address unpacking for dispenser that causes a complete network crash

# Credits
* Adam Krellenstein
9 changes: 9 additions & 0 deletions release-notes/release-notes-v9.61.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Release Notes - Counterparty Core v9.61.3 (2024-04-09)

# ChangeLog

## Stability and Correctness
* Add missing sanity check in address unpacking for dispensers that causes a complete network crash

# Credits
* Adam Krellenstein

0 comments on commit 2173d10

Please sign in to comment.