diff options
author | dlg <dlg@openbsd.org> | 2014-01-07 00:11:11 +0000 |
---|---|---|
committer | dlg <dlg@openbsd.org> | 2014-01-07 00:11:11 +0000 |
commit | c78ca77f70dfd60f3b580826cf45b8a4de4496ca (patch) | |
tree | 299cedef41a3df0e7e5830fc415e2a9e3067d8fe /usr.sbin/identd | |
parent | Gprof(1) is fun. You should use it more often. (diff) | |
download | wireguard-openbsd-c78ca77f70dfd60f3b580826cf45b8a4de4496ca.tar.xz wireguard-openbsd-c78ca77f70dfd60f3b580826cf45b8a4de4496ca.zip |
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')
-rw-r--r-- | usr.sbin/identd/identd.c | 4 |
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); |