mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-23 03:06:48 +00:00
Map negative types passed to vm_capability_type2name to NULL.
Submitted by: vangyzen
This commit is contained in:
parent
47332982bc
commit
24c2e17d2b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=360178
|
@ -841,7 +841,7 @@ vm_capability_name2type(const char *capname)
|
|||
const char *
|
||||
vm_capability_type2name(int type)
|
||||
{
|
||||
if (type < nitems(capstrmap))
|
||||
if (type >= 0 && type < nitems(capstrmap))
|
||||
return (capstrmap[type]);
|
||||
|
||||
return (NULL);
|
||||
|
|
Loading…
Reference in a new issue