aboutsummaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/socket.c b/socket.c
index 12dca7ab..3ae38016 100644
--- a/socket.c
+++ b/socket.c
@@ -750,7 +750,11 @@ int SSL_verify_callback( int ok_return, X509_STORE_CTX *ctx, int strict )
tp = text;
te = text + sizeof(text);
for (i = 0; i < dsz; i++) {
+#ifdef HAVE_SNPRINTF
esz = snprintf(tp, te - tp, i > 0 ? ":%02X" : "%02X", digest[i]);
+#else
+ esz = sprintf(tp, i > 0 ? ":%02X" : "%02X", digest[i]);
+#endif
if (esz >= te - tp) {
report(stderr, _("Digest text buffer too small!\n"));
return (0);