summaryrefslogtreecommitdiff
path: root/lib/dns/rdata/generic/sshfp_44.c
diff options
context:
space:
mode:
authorErwin Lansing <erwin@FreeBSD.org>2013-08-14 11:10:02 +0000
committerErwin Lansing <erwin@FreeBSD.org>2013-08-14 11:10:02 +0000
commit98ec2cd1facbb6a0e284fd0bacab33fbafb76fb8 (patch)
tree2158e1c09a984412fbfaaf073f515cd4e8f1ea60 /lib/dns/rdata/generic/sshfp_44.c
parent2f7409b5f669dbe3c0a8e58d8f526cb6ac4f64e1 (diff)
Notes
Diffstat (limited to 'lib/dns/rdata/generic/sshfp_44.c')
-rw-r--r--lib/dns/rdata/generic/sshfp_44.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/dns/rdata/generic/sshfp_44.c b/lib/dns/rdata/generic/sshfp_44.c
index 03d5127133c65..d553cd40380dc 100644
--- a/lib/dns/rdata/generic/sshfp_44.c
+++ b/lib/dns/rdata/generic/sshfp_44.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006, 2007, 2009, 2012, 2013 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006, 2007, 2009, 2011-2013 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -95,7 +95,11 @@ totext_sshfp(ARGS_TOTEXT) {
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
RETERR(str_totext(" (", target));
RETERR(str_totext(tctx->linebreak, target));
- RETERR(isc_hex_totext(&sr, tctx->width - 2, tctx->linebreak, target));
+ if (tctx->width == 0) /* No splitting */
+ RETERR(isc_hex_totext(&sr, 0, "", target));
+ else
+ RETERR(isc_hex_totext(&sr, tctx->width - 2,
+ tctx->linebreak, target));
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
RETERR(str_totext(" )", target));
return (ISC_R_SUCCESS);