summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2005-03-03 17:20:36 +0000
committeralfred <alfred@FreeBSD.org>2005-03-03 17:20:36 +0000
commit6d55822ad318691ab202f36e7fda2cb92e678dba (patch)
treed26b52504c5b36fdf06503c8a16d0554e3c99706 /usr.bin/truss
parent148546007037b5afa82d0db9d471ef618d875512 (diff)
downloadFreeBSD-src-6d55822ad318691ab202f36e7fda2cb92e678dba.zip
FreeBSD-src-6d55822ad318691ab202f36e7fda2cb92e678dba.tar.gz
Change fix a bug where the length of data written by snprintf was
being mishandled by using accumulation (into an uninitialized variable) instead of direct assignment. Reviewed by: scottl
Diffstat (limited to 'usr.bin/truss')
-rw-r--r--usr.bin/truss/syscalls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c
index db9b29b..71877ab 100644
--- a/usr.bin/truss/syscalls.c
+++ b/usr.bin/truss/syscalls.c
@@ -414,7 +414,7 @@ print_arg(int fd, struct syscall_args *sc, unsigned long *args, long retval) {
(POLLIN | POLLPRI | POLLOUT | POLLERR | POLLHUP | POLLNVAL | \
POLLRDNORM |POLLRDBAND | POLLWRBAND | POLLINIGNEOF)
- u += snprintf(tmp + used, per_fd,
+ u = snprintf(tmp + used, per_fd,
"%s%d 0x%hx%s%s%s%s%s%s%s%s%s ",
i > 0 ? " " : "",
pfd[i].fd,
OpenPOWER on IntegriCloud