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

segments larger than INT_MAX.
This commit is contained in:
Marcel Moolenaar 2014-01-16 06:26:03 +00:00
parent f263752668
commit 0b6a0ca072
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=260701

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);
}