diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ktrdump/ktrdump.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ktrdump/ktrdump.c b/usr.bin/ktrdump/ktrdump.c index d74b979..77ae522 100644 --- a/usr.bin/ktrdump/ktrdump.c +++ b/usr.bin/ktrdump/ktrdump.c @@ -86,6 +86,7 @@ main(int ac, char **av) u_long parms[KTR_PARMS]; struct ktr_entry *buf; uintmax_t tlast, tnow; + unsigned long bufptr; struct stat sb; kvm_t *kd; FILE *out; @@ -179,8 +180,9 @@ main(int ac, char **av) if ((buf = malloc(sizeof(*buf) * entries)) == NULL) err(1, NULL); if (kvm_read(kd, nl[2].n_value, &index, sizeof(index)) == -1 || - kvm_read(kd, nl[3].n_value, buf, sizeof(*buf) * entries) - == -1) + kvm_read(kd, nl[3].n_value, &bufptr, + sizeof(bufptr)) == -1 || + kvm_read(kd, bufptr, buf, sizeof(*buf) * entries) == -1) errx(1, "%s", kvm_geterr(kd)); } |