From: Kevin Backhouse Date: Wed, 3 Sep 2025 13:36:54 +0000 (+0100) Subject: Check for duplicate entries X-Git-Tag: archive/raspbian/25.03.0-11.1+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=de3772e97fc48bca35483ab5c01170f7c28d42b6;p=poppler.git Check for duplicate entries Origin: https://gitlab.freedesktop.org/poppler/poppler/-/commit/4ce27cc826bf90cc8dbbd8a8c87bd913cccd7ec0 Bug-Debian: https://bugs.debian.org/1117853 Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2025-52885 Gbp-Pq: Name Check-for-duplicate-entries.patch --- diff --git a/poppler/StructTreeRoot.cc b/poppler/StructTreeRoot.cc index 99ddbfe..f7a2794 100644 --- a/poppler/StructTreeRoot.cc +++ b/poppler/StructTreeRoot.cc @@ -137,6 +137,10 @@ void StructTreeRoot::parseNumberTreeNode(Dict *node) } int keyVal = key.getInt(); std::vector &vec = parentTree[keyVal]; + if (!vec.empty()) { + error(errSyntaxError, -1, "Nums item at position {0:d} is a duplicate entry for key {1:d}", i, keyVal); + continue; + } Object valueArray = nums.arrayGet(i + 1); if (valueArray.isArray()) {