Overrunning array pkgconf_pkg_comparator_names at element index 7

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
pull/109/head
Igor Gnatenko 2017-01-22 11:54:11 +01:00
parent 656faa6364
commit 0879d36ecc
1 changed files with 1 additions and 1 deletions

View File

@ -923,7 +923,7 @@ static const pkgconf_vercmp_res_func_t pkgconf_pkg_comparator_impls[] = {
const char *
pkgconf_pkg_get_comparator(const pkgconf_dependency_t *pkgdep)
{
if (pkgdep->compare > PKGCONF_ARRAY_SIZE(pkgconf_pkg_comparator_names))
if (pkgdep->compare >= PKGCONF_ARRAY_SIZE(pkgconf_pkg_comparator_names))
return "???";
return pkgconf_pkg_comparator_names[pkgdep->compare].name;