aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2004-11-12 21:15:21 +0000
committerMatthias Andree <matthias.andree@gmx.de>2004-11-12 21:15:21 +0000
commit35f08122fe2f801f067c223b08fe440cda5779ee (patch)
tree1dd336ecd08fdedf48a5b79d1b09d42e75e598b3
parent85026c42ec8ff853e10f03d28c95c12433fa776e (diff)
downloadfetchmail-35f08122fe2f801f067c223b08fe440cda5779ee.tar.gz
fetchmail-35f08122fe2f801f067c223b08fe440cda5779ee.tar.bz2
fetchmail-35f08122fe2f801f067c223b08fe440cda5779ee.zip
Replace sprintf.
svn path=/trunk/; revision=4004
-rw-r--r--env.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/env.c b/env.c
index 516040bd..aaddb54d 100644
--- a/env.c
+++ b/env.c
@@ -302,8 +302,11 @@ char *visbuf(const char *buf)
}
else
{
- (void) sprintf(tp, "\\0x%02x", *buf++);
- tp += strlen(tp);
+ const char hex[] = "0123456789abcdef";
+ *tp++ = '\\'; *tp++ = '0'; *tp++ = 'x';
+ *tp++ = hex[*buf >> 4];
+ *tp++ = hex[*buf & 0xf];
+ buf++;
}
}
*tp++ = '\0';