bignum: Avoid bogus newline in the log

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 258560da16)
This commit is contained in:
Jakub Jelen
2023-01-11 17:50:31 +01:00
parent 967082c207
commit 2461027f72

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 */
@@ -86,7 +86,8 @@ void ssh_print_bignum(const char *name, const_bignum num)
if (num != NULL) {
bignum_bn2hex(num, &hex);
}
SSH_LOG(SSH_LOG_DEBUG, "%s value: %s\n", name, (hex == NULL) ? "(null)" : (char *) hex);
SSH_LOG(SSH_LOG_DEBUG, "%s value: %s", name,
(hex == NULL) ? "(null)" : (char *)hex);
#ifdef HAVE_LIBGCRYPT
SAFE_FREE(hex);
#elif defined HAVE_LIBCRYPTO