From fa492f059db6e118b2c062989be8467a70a63c3e Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Tue, 26 Aug 2014 15:43:21 +0200 Subject: [PATCH] Fix a signedness mistake in secp256k1_num_set_hex We were using a potentially signed char as index in an array. --- src/num_gmp_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/num_gmp_impl.h b/src/num_gmp_impl.h index e9f1a1b..b6b3b84 100644 --- a/src/num_gmp_impl.h +++ b/src/num_gmp_impl.h @@ -300,7 +300,7 @@ void static secp256k1_num_set_hex(secp256k1_num_t *r, const char *a, int alen) { }; unsigned char num[257] = {}; for (int i=0; ilimbs = mpn_set_str(r->data, num, alen, 16); while (r->limbs > 1 && r->data[r->limbs-1] == 0) r->limbs--;