summaryrefslogtreecommitdiff
path: root/usr.sbin/identd/identd.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2014-01-07 00:11:12 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2014-01-07 00:11:12 +0000
commit84067f23add298259f298fcf0a048366953036ee (patch)
tree1e9847627600edb78ba4f3c5b66dee3050894c9c /usr.sbin/identd/identd.c
parente99bbf4b29a4c0d7791f0e51940ef913728e26e4 (diff)
the return from asprintf does NOT include the space used by the
terminating \0 character. if i want to use it as a c string i have to take that into account. found by simon kuhnle who supplied a good bug report. prodded by deraadt@
Diffstat (limited to 'usr.sbin/identd/identd.c')
-rw-r--r--usr.sbin/identd/identd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/identd/identd.c b/usr.sbin/identd/identd.c
index 0cfef24baa6..6e628e8df34 100644
--- a/usr.sbin/identd/identd.c
+++ b/usr.sbin/identd/identd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: identd.c,v 1.23 2013/11/21 03:09:07 dlg Exp $ */
+/* $OpenBSD: identd.c,v 1.24 2014/01/07 00:11:11 dlg Exp $ */
/*
* Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
@@ -395,7 +395,7 @@ parent_rd(int fd, short events, void *arg)
goto done;
}
- r->buflen = n;
+ r->buflen = n + 1;
done:
SIMPLEQ_INSERT_TAIL(&sc.parent.replies, r, entry);