bignum: Avoid bogus newline in the log

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2023-01-11 17:50:31 +01:00
committed by Andreas Schneider
parent e364b1e793
commit 258560da16

View File

@@ -44,7 +44,7 @@ ssh_string ssh_make_bignum_string(bignum num) {
#ifdef DEBUG_CRYPTO
SSH_LOG(SSH_LOG_TRACE,
"%zu bits, %zu bytes, %zu padding\n",
"%zu bits, %zu bytes, %zu padding",
bits, len, pad);
#endif /* DEBUG_CRYPTO */
@@ -87,7 +87,7 @@ void ssh_print_bignum(const char *name, const_bignum num)
bignum_bn2hex(num, &hex);
}
SSH_LOG(SSH_LOG_DEBUG, "%s value: %s", name,
(hex == NULL) ? "(null)" : (char *) hex);
(hex == NULL) ? "(null)" : (char *)hex);
#ifdef HAVE_LIBGCRYPT
SAFE_FREE(hex);
#elif defined HAVE_LIBCRYPTO