diff options
author | phk <phk@FreeBSD.org> | 2003-05-31 16:57:01 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-05-31 16:57:01 +0000 |
commit | dc5b07a729fa86298afcafa5a2ff51ef51bcedd7 (patch) | |
tree | 0aa3114c7dd732be838bd92f21e8eee8091b3dd9 /sys/i4b/driver/i4b_trace.c | |
parent | 170ff8a070ae09ddcfa76d7d4af98f69a84c177a (diff) | |
download | FreeBSD-src-dc5b07a729fa86298afcafa5a2ff51ef51bcedd7.zip FreeBSD-src-dc5b07a729fa86298afcafa5a2ff51ef51bcedd7.tar.gz |
Fix systematic off-by-one errors in unit number range checks.
Found by: FlexeLint
Diffstat (limited to 'sys/i4b/driver/i4b_trace.c')
-rw-r--r-- | sys/i4b/driver/i4b_trace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/i4b/driver/i4b_trace.c b/sys/i4b/driver/i4b_trace.c index d7c89e0..7237fc1 100644 --- a/sys/i4b/driver/i4b_trace.c +++ b/sys/i4b/driver/i4b_trace.c @@ -156,7 +156,7 @@ get_trace_data_from_l1(i4b_trace_hdr_t *hdr, int len, char *buf) /* check valid unit no */ - if((unit = hdr->unit) > NI4BTRC) + if((unit = hdr->unit) >= NI4BTRC) { printf("i4b_trace: get_trace_data_from_l1 - unit > NI4BTRC!\n"); return(0); |