mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 10:40:27 +09:00
bignum: Fix OpenSSL crash in SAFE_FREE
Signed-off-by: Michael Wilder <wilder.michael@cimcor.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 2f193b5cbb)
This commit is contained in:
committed by
Andreas Schneider
parent
d16eac5704
commit
25234e510a
@@ -103,5 +103,9 @@ void ssh_print_bignum(const char *which, bignum num) {
|
|||||||
#endif
|
#endif
|
||||||
fprintf(stderr, "%s value: ", which);
|
fprintf(stderr, "%s value: ", which);
|
||||||
fprintf(stderr, "%s\n", (hex == NULL) ? "(null)" : (char *) hex);
|
fprintf(stderr, "%s\n", (hex == NULL) ? "(null)" : (char *) hex);
|
||||||
|
#ifdef HAVE_LIBGCRYPT
|
||||||
SAFE_FREE(hex);
|
SAFE_FREE(hex);
|
||||||
|
#elif defined HAVE_LIBCRYPTO
|
||||||
|
OPENSSL_free(hex);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user