Handle truncation of the size returned by _kvm_kvatop(). Cores can have

segments larger than INT_MAX.
This commit is contained in:
marcel 2014-01-16 06:26:03 +00:00
parent f11710f126
commit 110a8053d6

View File

@ -371,5 +371,5 @@ _kvm_kvatop(kvm_t *kd, u_long va, off_t *ofs)
size_t sz;
sz = kd->vmst->kvatop(kd, va, ofs);
return (sz);
return ((sz > INT_MAX) ? INT_MAX : sz);
}