summaryrefslogtreecommitdiff
path: root/utils/rpctrace.c
diff options
context:
space:
mode:
authorZheng Da <zhengda1936@gmail.com>2009-07-31 17:11:55 +0200
committerThomas Schwinge <tschwinge@gnu.org>2009-10-12 23:21:28 +0200
commit42cbb794c2788ed504c3a1489395b26361cfeb4e (patch)
tree0312ebefc92b93cfb59c5bcbaebab69b63c6e6cc /utils/rpctrace.c
parent08aa7edb495445c0bfa54cb5d207e85c1df9008a (diff)
Fix bug #20612: rpctrace: heisenbug.
* utils/rpctrace.c (print_contents): Check the number of elements in the port array.
Diffstat (limited to 'utils/rpctrace.c')
-rw-r--r--utils/rpctrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/rpctrace.c b/utils/rpctrace.c
index d80f41dd..51824490 100644
--- a/utils/rpctrace.c
+++ b/utils/rpctrace.c
@@ -1,6 +1,6 @@
/* Trace RPCs sent to selected ports
- Copyright (C) 1998, 1999, 2001, 2002, 2003, 2005, 2006
+ Copyright (C) 1998, 1999, 2001, 2002, 2003, 2005, 2006, 2009
Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -631,7 +631,7 @@ print_contents (mach_msg_header_t *inp,
else
type->msgt_name = name;
}
- else if (newtypes[0] != name)
+ else if (nelt > 0 && newtypes[0] != name)
if (type->msgt_longform)
lt->msgtl_name = newtypes[0];
else