From 39e1e07749b8835258e68ab89ce91c59871114ca Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 15 Jun 2015 16:33:44 +1000 Subject: [PATCH] Add push 20 bytes to stack in address_to_scripttxn --- src/libckpool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libckpool.c b/src/libckpool.c index 25b5389c..398b1a1c 100644 --- a/src/libckpool.c +++ b/src/libckpool.c @@ -1503,7 +1503,7 @@ static const int b58tobin_tbl[] = { 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 }; -/* b58bin should always be at least 24 bytes long and already checked to be +/* b58bin should always be at least 25 bytes long and already checked to be * valid. */ void b58tobin(char *b58bin, const char *b58) { @@ -1636,7 +1636,8 @@ void address_to_scripttxn(char *pkh, const char *addr) b58tobin(b58bin, addr); pkh[0] = 0xa9; - memcpy(&pkh[1], &b58bin[1], 20); + pkh[1] = 0x14; + memcpy(&pkh[2], &b58bin[1], 20); pkh[22] = 0x87; }