aboutsummaryrefslogtreecommitdiffstats
path: root/env.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-08-18 04:05:05 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-08-18 04:05:05 +0000
commit9220032f8017cfb6a4ee0ddea3ee3d510686dc13 (patch)
tree9e7abb9cdbbd51cbfdd23275db1617f268769aa8 /env.c
parentd7e2c56ecb63526c6549c92564e5fdb581671870 (diff)
downloadfetchmail-9220032f8017cfb6a4ee0ddea3ee3d510686dc13.tar.gz
fetchmail-9220032f8017cfb6a4ee0ddea3ee3d510686dc13.tar.bz2
fetchmail-9220032f8017cfb6a4ee0ddea3ee3d510686dc13.zip
Enclose string dumps in doublequotes to work with visbuf properly.
svn path=/trunk/; revision=2045
Diffstat (limited to 'env.c')
-rw-r--r--env.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/env.c b/env.c
index 67679d19..3e86ac45 100644
--- a/env.c
+++ b/env.c
@@ -97,7 +97,12 @@ char *visbuf(const char *buf)
while (*buf)
{
- if (isprint(*buf) || *buf == ' ')
+ if (*buf == '"')
+ {
+ *tp++ = '\\'; *tp++ = '"';
+ buf++;
+ }
+ else if (isprint(*buf) || *buf == ' ')
*tp++ = *buf++;
else if (*buf == '\n')
{