summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2013-10-01 15:19:13 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2013-10-01 15:19:13 +0000
commita062f44721c3879b0ed21e9a7c30401c9f93b63c (patch)
tree14cf234db0e375020916f3c3567f8ccffdbe70f5 /usr.sbin
parent843266a405264bd7b6396a0421328541980784e2 (diff)
Tell strvisx() to encode newlines found in octet-strings to avoid ugly
line wraps.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/snmpd/smi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/snmpd/smi.c b/usr.sbin/snmpd/smi.c
index 476af7933ca..a18cefc9cd3 100644
--- a/usr.sbin/snmpd/smi.c
+++ b/usr.sbin/snmpd/smi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smi.c,v 1.13 2013/10/01 12:44:31 reyk Exp $ */
+/* $OpenBSD: smi.c,v 1.14 2013/10/01 15:19:12 reyk Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -513,7 +513,7 @@ smi_print_element(struct ber_element *root)
} else {
if ((p = malloc(root->be_len * 4 + 1)) == NULL)
goto fail;
- strvisx(p, buf, root->be_len, 0);
+ strvisx(p, buf, root->be_len, VIS_NL);
if (asprintf(&str, "\"%s\"", p) == -1) {
free(p);
goto fail;