From 98fe5eaf4728e6ee5fe487ac90441a47b99d13c1 Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Wed, 24 Oct 2012 11:17:48 +0000 Subject: [PATCH] - Removed snprintf altogether for critical code paths --- library/bignum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/bignum.c b/library/bignum.c index ef2fa50e1..922da81b5 100644 --- a/library/bignum.c +++ b/library/bignum.c @@ -406,7 +406,8 @@ int mpi_write_string( const mpi *X, int radix, char *s, size_t *slen ) if( c == 0 && k == 0 && ( i + j + 3 ) != 0 ) continue; - p += snprintf( p, 2, "%02X", c ); + *(p++) = "0123456789ABCDEF" [c % 16]; + *(p++) = "0123456789ABCDEF" [c / 16]; k = 1; } }