[Pkg-bitcoin-commits] [libbase58] 01/01: Imported Upstream version 0.1.4

Dmitry Smirnov onlyjob at moszumanska.debian.org
Fri Jun 19 03:26:08 UTC 2015


This is an automated email from the git hooks/post-receive script.

onlyjob pushed a commit to branch upstream
in repository libbase58.

commit cde49db (upstream)
Author: Dmitry Smirnov <onlyjob at member.fsf.org>
Date:   Fri Jun 19 03:18:00 2015

    Imported Upstream version 0.1.4
---
 base58.c                       | 2 +-
 configure.ac                   | 4 ++--
 tests/decode-highbit-prefix.sh | 3 +++
 tests/decode-highbit.sh        | 3 +++
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/base58.c b/base58.c
index 913d581..33566e0 100644
--- a/base58.c
+++ b/base58.c
@@ -52,7 +52,7 @@ bool b58tobin(void *bin, size_t *binszp, const char *b58, size_t b58sz)
 	memset(outi, 0, outisz * sizeof(*outi));
 	
 	// Leading zeros, just count
-	for (i = 0; i < b58sz && !b58digits_map[b58u[i]]; ++i)
+	for (i = 0; i < b58sz && b58u[i] == '1'; ++i)
 		++zerocount;
 	
 	for ( ; i < b58sz; ++i)
diff --git a/configure.ac b/configure.ac
index b5f5caa..b7ed159 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ dnl * under the terms of the standard MIT license.  See COPYING for more details
 
 AC_INIT(
 	[libbase58],
-	[0.1.3],
+	[0.1.4],
 	[luke_libbase58 at dashjr.org],
 	[libbase58])
 AC_CONFIG_AUX_DIR([.])
@@ -18,7 +18,7 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 LT_INIT([])
 
 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
-AC_SUBST([LIBBASE58_SO_VERSION], [0:1:0])
+AC_SUBST([LIBBASE58_SO_VERSION], [0:2:0])
 
 AC_CONFIG_FILES([Makefile
 	libbase58.pc:libbase58.pc.in
diff --git a/tests/decode-highbit-prefix.sh b/tests/decode-highbit-prefix.sh
new file mode 100644
index 0000000..89bfe3f
--- /dev/null
+++ b/tests/decode-highbit-prefix.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+hex=$(echo 993233 | xxd -r -p | base58 -d 25 || echo FAIL)
+test "x${hex}" = "xFAIL"
diff --git a/tests/decode-highbit.sh b/tests/decode-highbit.sh
new file mode 100644
index 0000000..a15ab0e
--- /dev/null
+++ b/tests/decode-highbit.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+hex=$(echo 319932 | xxd -r -p | base58 -d 25 || echo FAIL)
+test "x${hex}" = "xFAIL"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/libbase58.git



More information about the Pkg-bitcoin-commits mailing list