References: CVE-2026-16530
Description: libpcp_web: add numinst overflow check in pmDiscoverDecodeMetaInDom
 Upstream commit 7f42013d33a6717a45e8f9ac9e7d, adapted from the openSUSE 6.3.8
 backport to the calloc() allocation site of 7.1.5.

--- a/src/libpcp_web/src/discover.c
+++ b/src/libpcp_web/src/discover.c
@@ -2276,6 +2276,11 @@
 	     */
 	    char	**namelist;
 	    int		i;
+	    if (lid.numinst <= 0 ||
+		(size_t)lid.numinst > SIZE_MAX / sizeof(char *)) {
+		__pmFreeLogInDom(&lid);
+		return -EINVAL;
+	    }
 	    namelist = (char **)calloc(lid.numinst, sizeof(char *));
 	    if (namelist == NULL) {
 		pmNoMem(__FUNCTION__, lid.numinst * sizeof(char *), PM_RECOV_ERR);
