diff options
author | Moritz Jodeit <moritz@cvs.openbsd.org> | 2005-05-23 20:32:06 +0000 |
---|---|---|
committer | Moritz Jodeit <moritz@cvs.openbsd.org> | 2005-05-23 20:32:06 +0000 |
commit | fa4f3e0b645d6eb2d983b4f6e32ff006fa4610dd (patch) | |
tree | c384b53e4704a189f2c3cd5909a84a8bf89df1ec /usr.sbin/tcpdump | |
parent | ef2251540e4ecdd2f4095d30b64bace237482635 (diff) |
add some missing bounds checks. ok marius@
Diffstat (limited to 'usr.sbin/tcpdump')
-rw-r--r-- | usr.sbin/tcpdump/print-nfs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/print-nfs.c b/usr.sbin/tcpdump/print-nfs.c index c576607ad53..66be3e66b2e 100644 --- a/usr.sbin/tcpdump/print-nfs.c +++ b/usr.sbin/tcpdump/print-nfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-nfs.c,v 1.12 2004/09/16 11:26:39 markus Exp $ */ +/* $OpenBSD: print-nfs.c,v 1.13 2005/05/23 20:32:05 moritz Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 @@ -637,9 +637,11 @@ nfsreq_print(register const u_char *bp, u_int length, */ printf(" %u bytes @ ", (u_int32_t) ntohl(dp[4])); print_int64(dp, SIGNED); - if (vflag) + if (vflag) { + TCHECK(dp[5]); printf(" max %u verf %08x%08x", (u_int32_t) ntohl(dp[5]), dp[2], dp[3]); + } return; } break; @@ -669,6 +671,7 @@ nfsreq_print(register const u_char *bp, u_int length, printf(" commit"); if ((dp = parsereq(rp, length)) != NULL && (dp = parsefh(dp, v3)) != NULL) { + TCHECK(dp[2]); printf(" %u bytes @ ", (u_int32_t) ntohl(dp[2])); print_int64(dp, UNSIGNED); return; |