Date: Tue, 21 Apr 2020 21:48:36 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360178 - head/lib/libvmmapi Message-ID: <202004212148.03LLmaj0085007@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Tue Apr 21 21:48:35 2020 New Revision: 360178 URL: https://svnweb.freebsd.org/changeset/base/360178 Log: Map negative types passed to vm_capability_type2name to NULL. Submitted by: vangyzen Modified: head/lib/libvmmapi/vmmapi.c Modified: head/lib/libvmmapi/vmmapi.c ============================================================================== --- head/lib/libvmmapi/vmmapi.c Tue Apr 21 21:34:24 2020 (r360177) +++ head/lib/libvmmapi/vmmapi.c Tue Apr 21 21:48:35 2020 (r360178) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004212148.03LLmaj0085007>