Overrunning array pkgconf_pkg_comparator_names at element index 7
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>pull/109/head
parent
656faa6364
commit
0879d36ecc
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue